def test_input_validation(create_template_backend): runner = CliRunner() run_validatable_option_test(runner, create_template, create_template_backend.run, { '-u': 'unit', '-l': 'blueprint' }, [('-l', 'badlevelvalue', 'account')])
def test_input_validation(run_task_backend): runner = CliRunner() run_validatable_option_test(runner, run_task, run_task_backend.run, { '-i': 'container_name', '-w': 'task_name', '-t': 'tier', }, [('-d', 'not_an_int', 10)])
def test_input_validation(manage_file_crypto_backend): runner = CliRunner() with runner.isolated_filesystem(): os.mknod('crypto_file') run_validatable_option_test(runner, manage_file_crypto, manage_file_crypto_backend.run, {}, [('-f', 'nonexistingfile', 'crypto_file')])
def test_input_validation(create_reference_backend): runner = CliRunner() with runner.isolated_filesystem(): os.mkdir('output_dir') run_validatable_option_test(runner, create_reference, create_reference_backend.run, {'-t': 'type'}, [('-o', 'not_existing_dir', 'output_dir')])
def test_input_validation(manage_stack_backend): runner = CliRunner() run_validatable_option_test(runner, manage_stack, manage_stack_backend.run, { '-u': 'unit', '-l': 'segment' }, [('-l', 'badlevelvalue', 'segment'), ('-w', 'not_an_int', 10)])
def test_input_validation(create_template_backend, create_diagram_backend): runner = CliRunner() run_validatable_option_test( runner, draw_diagrams, create_template_backend.run, {"-i": "overview", "-d": "./"}, [], )
def test_input_validation(manage_deployment_backend): runner = CliRunner() run_validatable_option_test( runner, manage_deployment, manage_deployment_backend.run, {"-u": "unit", "-l": "group"}, [("-s", "badscopevalue", "resourceGroup"), ("-w", "not_an_int", 10)], )
def test_input_validation(manage_credentials_crypto_backend): runner = CliRunner() with runner.isolated_filesystem(): os.mknod('crypto_file') run_validatable_option_test(runner, manage_credentials_crypto, manage_credentials_crypto_backend.run, { '-n': 'credential_path', '-y': 'login' }, [('-y', 'invalidtype', 'login'), ('-f', 'nonexistingfile', 'crypto_file')])
def test_input_validation(run_expo_app_publish_backend): runner = CliRunner() run_validatable_option_test( runner, run_expo_app_publish, run_expo_app_publish_backend.run, { "-u": "unit", }, [], )
def test_input_validation(manage_crypto_backend): runner = CliRunner() with runner.isolated_filesystem(): open("crypto_file", "w").close() run_validatable_option_test( runner, manage_crypto, manage_crypto_backend.run, {}, [("-f", "nonexistingfile", "crypto_file")], )
def test_input_validation(blueprint_mock, ContextClassMock, contract_backend): runner = CliRunner() run_validatable_option_test( runner, run_runbook, contract_backend.run, { "-n": "RunBook1", }, [], )
def test_input_validation(manage_stack_backend): runner = CliRunner() run_validatable_option_test( runner, manage_stack, manage_stack_backend.run, { "-u": "unit", "-l": "group" }, [("-w", "not_an_int", 10)], )
def test_input_validation(blueprint_mock, ContextClassMock, create_template_backend): runner = CliRunner() run_validatable_option_test( runner, create_schemas, create_template_backend.run, { "-s": "Schema1", "-o": "." }, [], )
def test_input_validation(run_expo_app_publish_backend): runner = CliRunner() run_validatable_option_test( runner, run_expo_app_publish, run_expo_app_publish_backend.run, { '-u': 'unit', }, [ ('-t', 'not_an_int', 10) ] )
def test_input_validation(update_image_reference_backend): runner = CliRunner() run_validatable_option_test( runner, update_image_reference, update_image_reference_backend, { "-u": "deployment_unit", "-r": "build_reference", "-f": "image_format", }, [], )
def test_input_validation(run_task_backend): runner = CliRunner() run_validatable_option_test( runner, run_task, run_task_backend.run, { "-i": "container_name", "-w": "task_name", "-t": "tier", }, [("-d", "not_an_int", 10)], )
def test_input_validation(blueprint_mock, ContextClassMock, create_deployment_backend, run_deployment_backend): runner = CliRunner() run_validatable_option_test( runner, run_deployments, create_deployment_backend.run, { "-m": "DeploymentMode1", "-l": "DeploymentGroup1", "-u": "DeploymentUnit1", "-s": "deployed", }, [], )
def test_input_validation(manage_credentials_crypto_backend): runner = CliRunner() with runner.isolated_filesystem(): open("crypto_file", "w").close() run_validatable_option_test( runner, manage_credentials_crypto, manage_credentials_crypto_backend.run, { "-n": "credential_path", "-y": "login" }, [("-y", "invalidtype", "login"), ("-f", "nonexistingfile", "crypto_file")], )
def test_input_validation(transfer_image_backend): runner = CliRunner() run_validatable_option_test( runner, transfer_image, transfer_image_backend, { "-u": "deployment_unit", "-r": "build_reference", "-f": "image_format", "--source-account": "source_account", "--source-environment": "source_environment", }, [], )
def test_input_validation(manage_deployment_backend): runner = CliRunner() run_validatable_option_test( runner, manage_deployment, manage_deployment_backend.run, { '-u': 'unit', '-l': 'segment' }, [ ('-l', 'badlevelvalue', 'segment'), ('-s', 'badscopevalue', 'resourceGroup'), ('-w', 'not_an_int', 10) ] )
def test_input_validation(create_template_backend): runner = CliRunner() run_validatable_option_test(runner, invoke_entrance, create_template_backend.run, {"-e": "blueprint"}, [])