Skip to content

Commit

Permalink
Default to True for existing and update assess scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Veebers committed Jan 25, 2018
1 parent ca21cce commit 22c9be7
Show file tree
Hide file tree
Showing 23 changed files with 34 additions and 27 deletions.
2 changes: 1 addition & 1 deletion acceptancetests/assess_add_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def parse_args(argv):
parser = argparse.ArgumentParser(
description='Test if juju properly adds credentials with the '
'add-credential command.')
add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)
return parser.parse_args(argv)


Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_agent_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def parse_args(argv):
parser = ArgumentParser(
description="Test bootstrap for agent-metdadata-url")

add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)

parser.add_argument('--agent-file', required=True, action='store',
help='agent file to be used during bootstrap.')
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_autoload_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(
description="Test autoload-credentials command.")
add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)
return parser.parse_args(argv)


Expand Down
4 changes: 3 additions & 1 deletion acceptancetests/assess_budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ def assess_show_budget(client, budget_name, budget_value):
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="Test budget commands")
add_basic_testing_arguments(parser)
# Set to false it it's possible to overwrite actual cookie data if someone
# runs it against an existing environment
add_basic_testing_arguments(parser, existing=False)
return parser.parse_args(argv)


Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def parse_args(args):
subparser.add_argument('clouds_file',
help='A clouds.yaml file to use for testing.')
subparser.add_argument('cloud', help='Specific cloud to test.')
add_basic_testing_arguments(subparser, env=False)
add_basic_testing_arguments(subparser, env=False, existing=False)
subparser.add_argument('--config')
if test == 'provisioning':
subparser.add_argument('--machine-series', action='append',
Expand Down
6 changes: 3 additions & 3 deletions acceptancetests/assess_container_networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ def parse_args(argv=None):
case of failure pull logs and configuration files from the machine that
we detected a problem on for later analysis.
""")
parser = add_basic_testing_arguments(ArgumentParser(
description=description
))
parser = add_basic_testing_arguments(
ArgumentParser(description=description),
existing=False)
parser.add_argument(
'--machine-type',
help='Which virtual machine/container type to test. Defaults to all.',
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_destroy_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def parse_args(argv):
parser = argparse.ArgumentParser(
description='Test if juju drops selection of the current model '
'when that model is destroyed.')
add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)
return parser.parse_args(argv)


Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_endpoint_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def assess_endpoint_bindings(maas_manager, bootstrap_manager):
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="assess endpoint bindings")
add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)
args = parser.parse_args(argv)
if args.upload_tools:
parser.error("giving --upload-tools meaningless on 2.0 only test")
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_juju_sync_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def parse_args(argv):

parser = argparse.ArgumentParser(
description="Testing sync tools operates correctly")
add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)
return parser.parse_args(argv)


Expand Down
3 changes: 2 additions & 1 deletion acceptancetests/assess_log_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(
description="Test log forwarding of logs.")
add_basic_testing_arguments(parser)
# Don't use existing as this test modifies controller settings.
add_basic_testing_arguments(parser, existing=False)
return parser.parse_args(argv)


Expand Down
4 changes: 3 additions & 1 deletion acceptancetests/assess_log_rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ def check_log0(expected, action_output):
def parse_args(argv=None):
"""Parse all arguments."""
parser = add_basic_testing_arguments(
ArgumentParser(description='Test log rotation.'), deadline=False)
ArgumentParser(description='Test log rotation.'),
existing=False,
deadline=False)
parser.add_argument(
'agent',
help='Which agent log rotation to test.',
Expand Down
3 changes: 2 additions & 1 deletion acceptancetests/assess_model_config_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def set_clouds_yaml_config(client, config_details):
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="Test Model Tree Config")
add_basic_testing_arguments(parser)
# Modifies controller config, can't using existing safely.
add_basic_testing_arguments(parser, existing=False)
return parser.parse_args(argv)


Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_model_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(
description="Test model migration feature")
add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)
parser.add_argument(
'--use-develop',
action='store_true',
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_model_migration_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def assert_stable_juju_suitable_for_testing(stable_bsm, devel_bsm):
def parse_args(argv):
parser = argparse.ArgumentParser(
description='Test model migration between versioned controllers.')
add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)
parser.add_argument(
'--stable-juju-bin',
help='Path to juju binary to be used as the stable version of juju.')
Expand Down
3 changes: 2 additions & 1 deletion acceptancetests/assess_multimodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def check_services(client):
def parse_args(argv=None):
"""Parse all arguments."""
parser = ArgumentParser()
add_basic_testing_arguments(parser, using_jes=True, deadline=True)
add_basic_testing_arguments(
parser, using_jes=True, deadline=True, existing=False)
return parser.parse_args(argv)


Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_network_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def _setup_spaces(bundle, existing_spaces):
def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(description="Test Network Health")
add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)
parser.add_argument('--bundle', help='Bundle to test network against')
parser.add_argument('--model', help='Existing Juju model to test against')
parser.add_argument('--reboot', type=bool,
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def restore_missing_state_server(bs_manager, controller_client, backup_file,

def parse_args(argv=None):
parser = ArgumentParser(description='Test recovery strategies.')
add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)
parser.add_argument(
'--charm-series', help='Charm series.', default='')
strategy = parser.add_argument_group('test strategy')
Expand Down
6 changes: 3 additions & 3 deletions acceptancetests/assess_spaces_subnets.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def parse_args(argv=None):
case of failure pull logs and configuration files from the machine that
we detected a problem on for later analysis.
""")
parser = add_basic_testing_arguments(ArgumentParser(
description=description
))
parser = add_basic_testing_arguments(
ArgumentParser(description=description),
existing=False)
parser.add_argument(
'--clean-environment', action='store_true', help=dedent("""\
Attempts to re-use an existing environment rather than destroying it
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_unregister.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def assert_controller_list(client, controller_list):

def parse_args(argv):
parser = argparse.ArgumentParser(description="Test unregister feature.")
add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)
return parser.parse_args(argv)


Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_user_grant_revoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def parse_args(argv):
"""Parse all arguments."""
parser = argparse.ArgumentParser(
description="Test grant and revoke permissions for users")
add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)
return parser.parse_args(argv)


Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/deploy_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def upgrade_juju(client):

def deploy_job_parse_args(argv=None):
parser = ArgumentParser('deploy_job')
add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)
parser.add_argument('--upgrade', action="store_true", default=False,
help='Perform an upgrade test.')
parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/run_deployer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def parse_args(argv=None):
help='Perform an upgrade test.')
parser.add_argument('bundle_path',
help='URL or path to a bundle')
add_basic_testing_arguments(parser)
add_basic_testing_arguments(parser, existing=False)
parser.add_argument('--allow-native-deploy', action='store_true',
help='Let juju 2 use native bundle deploying.')
parser.add_argument('--bundle-verification-script',
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def add_arg_juju_bin(parser):


def add_basic_testing_arguments(
parser, using_jes=False, deadline=True, env=True, existing=False):
parser, using_jes=False, deadline=True, env=True, existing=True):
"""Returns the parser loaded with basic testing arguments.
The basic testing arguments, used in conjuction with boot_context ensures
Expand Down

0 comments on commit 22c9be7

Please sign in to comment.