From 6e87668a8490acc22f434910042e55cf961ddaa4 Mon Sep 17 00:00:00 2001 From: yhaliaw <43424755+yhaliaw@users.noreply.github.com> Date: Thu, 30 Nov 2023 14:10:59 +0800 Subject: [PATCH] Fix CURL post issue --- templates/pre-job.j2 | 1 + tests/integration/test_charm_fork_repo.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/pre-job.j2 b/templates/pre-job.j2 index 282252e66..da4ff3164 100644 --- a/templates/pre-job.j2 +++ b/templates/pre-job.j2 @@ -46,6 +46,7 @@ if [[ "${GITHUB_WORKFLOW}" == "Workflow Dispatch Failure Tests 2a34f8b1-41e4-4bc logger -s "Running the test workflow for integration tests, this test is configured to fail" curl "${CURL_ARGS[@]}" \ + -X POST \ http://{{host_ip}}:8080/always-fail/check-run &> repo_check_output.txt REPO_CHECK=$? diff --git a/tests/integration/test_charm_fork_repo.py b/tests/integration/test_charm_fork_repo.py index d8b3cf84d..6e0e362e7 100644 --- a/tests/integration/test_charm_fork_repo.py +++ b/tests/integration/test_charm_fork_repo.py @@ -75,7 +75,7 @@ async def test_dispatch_workflow_failure( "Stopping execution of jobs due to repository setup is not compliant with policies" in logs ) - assert "The method is not allowed for the requested URL" in logs + assert "Endpoint designed for testing that always fails" in logs assert "Should not echo if pre-job script failed" not in logs