Skip to content

Commit

Permalink
Force the use of python3 in all acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
achilleasa committed Jan 13, 2021
1 parent 8d827b1 commit 85c6175
Show file tree
Hide file tree
Showing 49 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion acceptancetests/assess
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# create_juju_test_env is a developer-centric tool. It creates an environment for running
# acceptance tests locally under LXD.
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_add_cloud.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

import logging
import re
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_add_credentials.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Assess proper functionality of juju add-credential."""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_agent_metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
Juju agent-metadata-url validation on passing as an argument during
juju bootstrap
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_autoload_credentials.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Tests for the autoload-credentials command."""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_block.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Assess juju blocks prevent users from making changes and models"""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_bootstrap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function

from argparse import ArgumentParser
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_cloud.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from argparse import ArgumentParser
import logging
from textwrap import dedent
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_cloud_display.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function

Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_constraints.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""This module tests the deployment with constraints."""

from __future__ import print_function
Expand Down
4 changes: 2 additions & 2 deletions acceptancetests/assess_container_networking.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from argparse import ArgumentParser
import contextlib
Expand Down Expand Up @@ -121,7 +121,7 @@ def make_machines(client, container_types, space):
sargs = []
if space:
sargs = ['--constraints', 'spaces=' + space]

for host, containers in required.iteritems():
for container in containers:
client.juju('add-machine', tuple(['{}:{}'.format(container, host)] + sargs))
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_cross_model_relations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Functional tests for Cross Model Relation (CMR) functionality.
This test exercises the CMR Juju functionality which allows applications to
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_destroy_model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Assess if Juju tracks the model when the current model is destroyed."""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_endpoint_bindings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Validate endpoint bindings functionality on MAAS."""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_heterogeneous_control.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from argparse import ArgumentParser
from contextlib import contextmanager
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_juju_output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
Deploy a charm and subordinate charm and verify juju-status attribute of
the deployed charms.
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_juju_sync_tools.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function

Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_log_forward.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Test Juju's log forwarding feature.
Log forwarding allows a controller to forward syslog from all models of a
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_log_rotation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function

from argparse import ArgumentParser
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_min_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function

import argparse
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_mixed_images.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Assess mixed deployment of images from two sets of simplestreams."""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_model_config_tree.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Test Model Tree Config functionality.
Tests that default values can be overwritten and then unset.
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_model_defaults.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Assess the model-defaults command."""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_model_migration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Tests for the Model Migration feature"""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_model_migration_versions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Test migrating models between controllers of increasing versions."""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_multi_series_charms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
Charms have the capability to declare that they support more than
one series. Previously a separate copy of the charm was required for
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_multimodel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Assess multimodel support."""

from argparse import ArgumentParser
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_network_health.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Assess network health for a given deployment or bundle"""
from __future__ import print_function

Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_network_spaces.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Assess network spaces for supported providers (currently only EC2)"""

import argparse
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_persistent_storage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Testing Juju's persistent storage feature."""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_primary_sub_relations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Test relations between primary and subordinates are cleanedup correctly"""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_proxy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Assess Juju under various proxy network conditions.
This test is dangerous to run on your own host. It will change the host's
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_recovery.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Backup and restore a stack.

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_resolve.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
""" Ensure resolve command resolves hook issues.
This test covers the resolve command (and the option --no-retry)
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_resources.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function

Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_sla.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""This test will test the juju sla command. Currently, testing budget or
supported sla models requires a functioning omnibus. As such, the current
test merely checks to ensure unsupported models appear as unsupported"""
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_spaces_subnets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function
from argparse import ArgumentParser
import re
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_ssh_keys.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Validate ability of the user to import and remove ssh keys"""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_storage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Assess juju charm storage."""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_unregister.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Tests for the unregister command
Ensure that a users controller can be unregistered.
Expand Down
4 changes: 2 additions & 2 deletions acceptancetests/assess_upgrade_lxd_profile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

""" Assess upgrading charms with lxd-profiles in different deployment scenarios.
"""
Expand Down Expand Up @@ -89,4 +89,4 @@ def main(argv=None):
assess_profile_machines(client)

if __name__ == '__main__':
sys.exit(main())
sys.exit(main())
2 changes: 1 addition & 1 deletion acceptancetests/assess_upgrade_series.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Assess upgrading using the 'upgrade-series' commands."""

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_user_grant_revoke.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""This testsuite is intended to test basic user permissions. Users
can be granted read or full privileges by model. Revoking those
privileges should remove them.
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/assess_wallet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
This tests the wallet commands utilized for commercial charm billing.
These commands are linked to a ubuntu sso account, and as such, require the
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/deploy_job.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from deploy_stack import deploy_job
if __name__ == '__main__':
deploy_job()
4 changes: 2 additions & 2 deletions acceptancetests/deploy_stack.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import print_function

from argparse import ArgumentParser
Expand Down Expand Up @@ -874,7 +874,7 @@ def from_client_existing(cls, args, client, existing_controller):
controller_strategy = ExistingController(client)
return cls(
args.temp_env_name, client, client, args.bootstrap_host,
args.machine, args.series, args.arch, args.agent_url,
args.machine, args.series, args.arch, args.agent_url,
args.agent_stream, args.region, args.logs, args.keep_env,
controller_strategy=controller_strategy,
existing_controller=existing_controller)
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/jujupy/timeout.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# This file is part of JujuPy, a library for driving the Juju CLI.
# Copyright 2015, 2017 Canonical Ltd.
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/log_check.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Simple looped check over provided file for regex content."""
from __future__ import print_function

Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/template_assess.py.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
""" TODO: Single line description of this assess script purpose.
TODO: add description For:
Expand Down

0 comments on commit 85c6175

Please sign in to comment.