mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[docker/dashboard] Fix ray dashboard (#12899)
This commit is contained in:
parent
dac8b3d58a
commit
0ec9ddabc1
3 changed files with 33 additions and 1 deletions
|
@ -598,7 +598,8 @@ class DockerCommandRunner(CommandRunnerInterface):
|
|||
shutdown_after_run=False,
|
||||
):
|
||||
if run_env == "auto":
|
||||
run_env = "host" if cmd.find("docker") == 0 else "docker"
|
||||
run_env = "host" if (not bool(cmd)
|
||||
or cmd.find("docker") == 0) else "docker"
|
||||
|
||||
if environment_variables:
|
||||
cmd = _with_environment_variables(cmd, environment_variables)
|
||||
|
|
|
@ -319,6 +319,30 @@ def test_ray_attach(configure_lang, configure_aws, _unlink_test_ssh_key):
|
|||
_check_output_via_pattern("test_ray_attach.txt", result)
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.platform == "darwin" and "travis" in os.environ.get("USER", ""),
|
||||
reason=("Mac builds don't provide proper locale support"))
|
||||
@mock_ec2
|
||||
@mock_iam
|
||||
def test_ray_dashboard(configure_lang, configure_aws, _unlink_test_ssh_key):
|
||||
def commands_mock(command, stdin):
|
||||
# TODO(maximsmol): this is a hack since stdout=sys.stdout
|
||||
# doesn't work with the mock for some reason
|
||||
print("ubuntu@ip-.+:~$ exit")
|
||||
return PopenBehaviour(stdout="ubuntu@ip-.+:~$ exit")
|
||||
|
||||
with _setup_popen_mock(commands_mock):
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(scripts.up, [
|
||||
DEFAULT_TEST_CONFIG_PATH, "--no-config-cache", "-y",
|
||||
"--log-style=pretty", "--log-color", "False"
|
||||
])
|
||||
_die_on_error(result)
|
||||
|
||||
result = runner.invoke(scripts.dashboard, [DEFAULT_TEST_CONFIG_PATH])
|
||||
_check_output_via_pattern("test_ray_dashboard.txt", result)
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.platform == "darwin" and "travis" in os.environ.get("USER", ""),
|
||||
reason=("Mac builds don't provide proper locale support"))
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
Attempting to establish dashboard locally at localhost:8265 connected to remote port 8265
|
||||
Loaded cached provider configuration
|
||||
If you experience issues with the cloud provider, try re-running the command with --no-config-cache.
|
||||
Fetched IP: .+
|
||||
Forwarding ports
|
||||
ubuntu@ip-.+:~\$ exit
|
||||
Successfully established connection.
|
Loading…
Add table
Reference in a new issue