Bug 1442084 [wpt PR 9725] - Fix #9724: Make test_sauce actually pass, a=testonly

Automatic update from web-platform-testsFix #9724: Make test_sauce actually pass

This regressed in e56563d2b1e8bd225bf4c8b4682cbd12beeae1a7

wpt-commits: 84242181f245c254d28fddfe2e84ac911101d997
wpt-pr: 9725
wpt-commits: 84242181f245c254d28fddfe2e84ac911101d997
wpt-pr: 9725
This commit is contained in:
Geoffrey Sneddon 2018-03-26 14:49:14 +00:00 committed by James Graham
parent 73bcc59b97
commit a03ed1cebc

View File

@ -28,7 +28,9 @@ def test_sauceconnect_success():
env_config = {
"domains": {"": "example.net"}
}
sauce_connect.__enter__(None, env_config)
sauce_connect(None, env_config)
with sauce_connect:
pass
@pytest.mark.parametrize("readyfile,returncode", [
@ -57,8 +59,10 @@ def test_sauceconnect_failure_exit(readyfile, returncode):
env_config = {
"domains": {"": "example.net"}
}
sauce_connect(None, env_config)
with pytest.raises(sauce.SauceException):
sauce_connect.__enter__(None, env_config)
with sauce_connect:
pass
# Given we appear to exit immediately with these mocks, sleep shouldn't be called
sleep.assert_not_called()
@ -82,8 +86,10 @@ def test_sauceconnect_failure_never_ready():
env_config = {
"domains": {"": "example.net"}
}
sauce_connect(None, env_config)
with pytest.raises(sauce.SauceException):
sauce_connect.__enter__(None, env_config)
with sauce_connect:
pass
# We should sleep while waiting for it to create the readyfile
sleep.assert_called()
@ -110,8 +116,8 @@ def test_sauceconnect_tunnel_domains():
env_config = {
"domains": {"foo": "foo.bar.example.com", "": "example.net"}
}
sauce_connect.__enter__(None, env_config)
sauce_connect(None, env_config)
with sauce_connect:
Popen.assert_called_once()
args, kwargs = Popen.call_args
cmd = args[0]