From a89fee37c5f1500cee644c026dd1981d59e72342 Mon Sep 17 00:00:00 2001 From: squiishyy Date: Mon, 23 Oct 2023 13:36:43 -0700 Subject: [PATCH 1/5] add project name and domain name Signed-off-by: squiishyy --- boilerplate/flyte/end2end/run-tests.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/boilerplate/flyte/end2end/run-tests.py b/boilerplate/flyte/end2end/run-tests.py index 5365da0..582aedf 100644 --- a/boilerplate/flyte/end2end/run-tests.py +++ b/boilerplate/flyte/end2end/run-tests.py @@ -179,11 +179,13 @@ def run( priorities: List[str], config_file_path, terminate_workflow_on_failure: bool, + test_project_name: str, + test_project_domain: str, ) -> List[Dict[str, str]]: remote = FlyteRemote( Config.auto(config_file=config_file_path), - default_project="flytesnacks", - default_domain="development", + test_project_name, + test_project_domain, ) # For a given release tag and priority, this function filters the workflow groups from the flytesnacks @@ -261,15 +263,30 @@ def run( @click.argument("flytesnacks_release_tag") @click.argument("priorities") @click.argument("config_file") +@click.option( + "test_project_name", + default="flytesnacks", + is_flag=False, + help="Name of project to run functional tests on" +) +@click.option( + "test_project_domain", + default="development", + is_flag=False, + help="Name of domain in project to run functional tests on", +) def cli( flytesnacks_release_tag, priorities, config_file, return_non_zero_on_failure, terminate_workflow_on_failure, + test_project_name, + test_project_domain, ): print(f"return_non_zero_on_failure={return_non_zero_on_failure}") - results = run(flytesnacks_release_tag, priorities, config_file, terminate_workflow_on_failure) + results = run(flytesnacks_release_tag, priorities, config_file, terminate_workflow_on_failure, test_project_name, + test_project_domain) # Write a json object in its own line describing the result of this run to stdout print(f"Result of run:\n{json.dumps(results)}") From ead3ac55cddc244c8c1c7b32c9730a05516f7879 Mon Sep 17 00:00:00 2001 From: squiishyy Date: Mon, 23 Oct 2023 13:59:03 -0700 Subject: [PATCH 2/5] adding dashes for flags Signed-off-by: squiishyy --- boilerplate/flyte/end2end/run-tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boilerplate/flyte/end2end/run-tests.py b/boilerplate/flyte/end2end/run-tests.py index 582aedf..189545d 100644 --- a/boilerplate/flyte/end2end/run-tests.py +++ b/boilerplate/flyte/end2end/run-tests.py @@ -264,13 +264,13 @@ def run( @click.argument("priorities") @click.argument("config_file") @click.option( - "test_project_name", + "--test_project_name", default="flytesnacks", is_flag=False, help="Name of project to run functional tests on" ) @click.option( - "test_project_domain", + "--test_project_domain", default="development", is_flag=False, help="Name of domain in project to run functional tests on", From ee92e2a5ab2c9c452684ac067701ae1ab2e3b1dc Mon Sep 17 00:00:00 2001 From: squiishyy Date: Mon, 23 Oct 2023 13:59:40 -0700 Subject: [PATCH 3/5] moved Signed-off-by: squiishyy --- boilerplate/flyte/end2end/run-tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boilerplate/flyte/end2end/run-tests.py b/boilerplate/flyte/end2end/run-tests.py index 189545d..c011278 100644 --- a/boilerplate/flyte/end2end/run-tests.py +++ b/boilerplate/flyte/end2end/run-tests.py @@ -260,9 +260,6 @@ def run( is_flag=True, help="Abort failing workflows upon exit", ) -@click.argument("flytesnacks_release_tag") -@click.argument("priorities") -@click.argument("config_file") @click.option( "--test_project_name", default="flytesnacks", @@ -275,6 +272,9 @@ def run( is_flag=False, help="Name of domain in project to run functional tests on", ) +@click.argument("flytesnacks_release_tag") +@click.argument("priorities") +@click.argument("config_file") def cli( flytesnacks_release_tag, priorities, From 109186661e965fff12cb5918c4974961fa9efbdd Mon Sep 17 00:00:00 2001 From: squiishyy Date: Mon, 23 Oct 2023 14:07:24 -0700 Subject: [PATCH 4/5] added type Signed-off-by: squiishyy --- boilerplate/flyte/end2end/run-tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boilerplate/flyte/end2end/run-tests.py b/boilerplate/flyte/end2end/run-tests.py index c011278..cbc3dd8 100644 --- a/boilerplate/flyte/end2end/run-tests.py +++ b/boilerplate/flyte/end2end/run-tests.py @@ -262,12 +262,14 @@ def run( ) @click.option( "--test_project_name", + type=str, default="flytesnacks", is_flag=False, help="Name of project to run functional tests on" ) @click.option( "--test_project_domain", + type=str, default="development", is_flag=False, help="Name of domain in project to run functional tests on", From 300a0f3f34ebf76a9e74bac7d31f455d132dadf2 Mon Sep 17 00:00:00 2001 From: squiishyy Date: Mon, 23 Oct 2023 14:08:45 -0700 Subject: [PATCH 5/5] style Signed-off-by: squiishyy --- boilerplate/flyte/end2end/run-tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boilerplate/flyte/end2end/run-tests.py b/boilerplate/flyte/end2end/run-tests.py index cbc3dd8..31f66d9 100644 --- a/boilerplate/flyte/end2end/run-tests.py +++ b/boilerplate/flyte/end2end/run-tests.py @@ -262,15 +262,15 @@ def run( ) @click.option( "--test_project_name", - type=str, default="flytesnacks", + type=str, is_flag=False, help="Name of project to run functional tests on" ) @click.option( "--test_project_domain", - type=str, default="development", + type=str, is_flag=False, help="Name of domain in project to run functional tests on", )