Skip to content

Commit

Permalink
fix: failing e2e tests in CI due to ipv6 binding (#592)
Browse files Browse the repository at this point in the history
Some tests in the e2e suite are attempting to bind to ipv6 in the CI
pipeline. Switching 'localhost' for '127.0.0.1' to prevent these
failures.

Also updating the build-and-push-image CI job to run only if the e2e
tests pass.
  • Loading branch information
ttuffin authored Oct 4, 2023
1 parent 1a2212e commit 224c0a8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
pytest -m "e2e" -n auto'
build-and-push-image:
needs: build-and-test-image
if: github.repository == 'ansible/ansible-rulebook'
runs-on: ubuntu-latest
permissions:
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_match_multiple_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def test_match_multiple_rules():
proc_id = "42"
port = 31415
rulebook = utils.BASE_DATA_PATH / "rulebooks/test_match_multiple_rules.yml"
websocket_address = f"ws://localhost:{port}{endpoint}"
websocket_address = f"ws://127.0.0.1:{port}{endpoint}"
cmd = utils.Command(
rulebook=rulebook,
websocket=websocket_address,
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_non_alpha_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def test_non_alpha_numeric_keys():
proc_id = "42"
port = 31415
rulebook = utils.EXAMPLES_PATH / "82_non_alpha_keys.yml"
websocket_address = f"ws://localhost:{port}{endpoint}"
websocket_address = f"ws://127.0.0.1:{port}{endpoint}"
cmd = utils.Command(
rulebook=rulebook,
websocket=websocket_address,
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_run_module_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def test_run_module_output():
proc_id = "42"
port = 31415
rulebook = utils.EXAMPLES_PATH / "29_run_module.yml"
websocket_address = f"ws://localhost:{port}{endpoint}"
websocket_address = f"ws://127.0.0.1:{port}{endpoint}"
cmd = utils.Command(
rulebook=rulebook,
websocket=websocket_address,
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def test_websocket_messages():
rulebook = (
utils.BASE_DATA_PATH / "rulebooks/websockets/test_websocket_range.yml"
)
websocket_address = f"ws://localhost:{port}{endpoint}"
websocket_address = f"ws://127.0.0.1:{port}{endpoint}"
cmd = utils.Command(
rulebook=rulebook,
websocket=websocket_address,
Expand Down

0 comments on commit 224c0a8

Please sign in to comment.