Skip to content

Commit

Permalink
fix: the reviewer suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: taieeuu <[email protected]>
  • Loading branch information
taieeuu committed Dec 6, 2024
1 parent 4475738 commit 8202004
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion boilerplate/flyte/end2end/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ def setup_flytesnacks_env(pytestconfig):
"test_project_name": pytestconfig.getoption("--test_project_name"),
"test_project_domain": pytestconfig.getoption("--test_project_domain"),
"cluster_pool_name": pytestconfig.getoption("--cluster_pool_name"),
}
}
19 changes: 10 additions & 9 deletions boilerplate/flyte/end2end/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,7 @@ def test_run(setup_flytesnacks_env):
test_project_name,
test_project_domain,
)

# assert flytesnacks_release_tag == "v1.0.0"
# assert config_file_path == "/path/to/config.yaml"


# For a given release tag and priority, this function filters the workflow groups from the flytesnacks
# manifest file. For example, for the release tag "v0.2.224" and the priority "P0" it returns [ "core" ].
manifest_url = (
Expand All @@ -148,6 +145,7 @@ def test_run(setup_flytesnacks_env):
)
r = requests.get(manifest_url)
parsed_manifest = r.json()
workflow_groups = []
workflow_groups = (
["lite"]
if "lite" in priorities
Expand Down Expand Up @@ -209,8 +207,11 @@ def test_run(setup_flytesnacks_env):
print(f"Result of run:\n{json.dumps(results)}")

if return_non_zero_on_failure:
for result in results:
if result["status"] not in ("passing", "coming soon"):
pytest.fail("Workflow execution failed")

return results
fail_results = [result for result in results if result["status"] not in ("passing", "coming soon")]
if fail_results:
fail_msgs = [
f"Workflow '{r['label']}' failed with status '{r['status']}'" for r in fail_results
]
pytest.fail("\n".join(fail_msgs))

assert results == [{"label": "core", "status": "passing", "color": "green"}]

0 comments on commit 8202004

Please sign in to comment.