forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dashboard] Fixes dashboard issues when environments have set http_pr…
…oxy (ray-project#12598) * fixes ray start with http_proxy * format * fixes * fixes * increase timeout * address comments
- Loading branch information
Showing
8 changed files
with
97 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,40 @@ | ||
import os | ||
import pytest | ||
from ray.tests.conftest import * # noqa | ||
|
||
|
||
@pytest.fixture | ||
def enable_test_module(): | ||
os.environ["RAY_DASHBOARD_MODULE_TEST"] = "true" | ||
yield | ||
os.environ.pop("RAY_DASHBOARD_MODULE_TEST", None) | ||
|
||
|
||
@pytest.fixture | ||
def disable_aiohttp_cache(): | ||
os.environ["RAY_DASHBOARD_NO_CACHE"] = "true" | ||
yield | ||
os.environ.pop("RAY_DASHBOARD_NO_CACHE", None) | ||
import os | ||
import pytest | ||
from ray.tests.conftest import * # noqa | ||
|
||
|
||
@pytest.fixture | ||
def enable_test_module(): | ||
os.environ["RAY_DASHBOARD_MODULE_TEST"] = "true" | ||
yield | ||
os.environ.pop("RAY_DASHBOARD_MODULE_TEST", None) | ||
|
||
|
||
@pytest.fixture | ||
def disable_aiohttp_cache(): | ||
os.environ["RAY_DASHBOARD_NO_CACHE"] = "true" | ||
yield | ||
os.environ.pop("RAY_DASHBOARD_NO_CACHE", None) | ||
|
||
|
||
@pytest.fixture | ||
def set_http_proxy(): | ||
http_proxy = os.environ.get("http_proxy", None) | ||
https_proxy = os.environ.get("https_proxy", None) | ||
|
||
# set http proxy | ||
os.environ["http_proxy"] = "www.example.com:990" | ||
os.environ["https_proxy"] = "www.example.com:990" | ||
|
||
yield | ||
|
||
# reset http proxy | ||
if http_proxy: | ||
os.environ["http_proxy"] = http_proxy | ||
else: | ||
del os.environ["http_proxy"] | ||
|
||
if https_proxy: | ||
os.environ["https_proxy"] = https_proxy | ||
else: | ||
del os.environ["https_proxy"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters