diff --git a/docs/commands/workflow_test_on_invocation.rst b/docs/commands/workflow_test_on_invocation.rst index 14e0c5ef5..f8108f104 100644 --- a/docs/commands/workflow_test_on_invocation.rst +++ b/docs/commands/workflow_test_on_invocation.rst @@ -8,7 +8,7 @@ This section is auto-generated from the help text for the planemo command **Usage**:: - planemo workflow_test_on_invocation [OPTIONS] TEST DEFINITION + planemo workflow_test_on_invocation [OPTIONS] TEST DEFINITION INVOCATION **Help** diff --git a/planemo/commands/cmd_workflow_test_on_invocation.py b/planemo/commands/cmd_workflow_test_on_invocation.py index adf6bca19..4384ae6da 100644 --- a/planemo/commands/cmd_workflow_test_on_invocation.py +++ b/planemo/commands/cmd_workflow_test_on_invocation.py @@ -14,17 +14,17 @@ @click.command("workflow_test_on_invocation") @options.optional_tools_arg(multiple=False, allow_uris=False, metavar="TEST DEFINITION") -@options.required_workflow_arg() +@options.required_invocation_id_arg() @options.galaxy_url_option(required=True) @options.galaxy_user_key_option(required=True) @options.test_index_option() @options.test_output_options() @command_function -def cli(ctx, path, workflow_identifier, test_index, **kwds): +def cli(ctx, path, invocation_id, test_index, **kwds): """Run defined tests against existing workflow invocation.""" with engine_context(ctx, engine="external_galaxy", **kwds) as engine, engine.ensure_runnables_served([]) as config: user_gi = config.user_gi - invocation = user_gi.invocations.show_invocation(workflow_identifier) + invocation = user_gi.invocations.show_invocation(invocation_id) runnable = for_runnable_identifier(ctx, f"{GALAXY_WORKFLOW_INSTANCE_PREFIX}{invocation['workflow_id']}", kwds) test_cases = definition_to_test_case(path, runnable) assert ( diff --git a/planemo/options.py b/planemo/options.py index e387ddfe4..05f67b495 100644 --- a/planemo/options.py +++ b/planemo/options.py @@ -754,6 +754,14 @@ def required_workflow_arg(): ) +def required_invocation_id_arg(): + return click.argument( + "invocation_id", + metavar="INVOCATION ID", + type=str, + ) + + def split_job_and_test(): return click.option( "--split_test/--no_split_test", default=False, help="Write workflow job and test definitions to separate files."