From b80f008e62bb8134e62661b659cfd658961211c4 Mon Sep 17 00:00:00 2001 From: Saad Zaher Date: Mon, 22 May 2017 16:35:36 +0000 Subject: [PATCH] Update freezer for pike goal python 3.5 Also remove white spaces. Change-Id: Ife979e1ee3cedce831b683db191bdaa70dc04eb3 --- .testr.conf | 2 +- freezer/tests/integration/common.py | 23 +++++++++---------- freezer/tests/integration/test_agent.py | 22 +++++++++--------- .../tests/integration/test_rsync_backup.py | 6 ++--- setup.cfg | 4 ++++ 5 files changed, 30 insertions(+), 27 deletions(-) diff --git a/.testr.conf b/.testr.conf index 752a2789..de8ad7f3 100644 --- a/.testr.conf +++ b/.testr.conf @@ -2,7 +2,7 @@ test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \ - ${PYTHON:-python} -m subunit.run discover -s ${OS_TEST_PATH:-./tests/unit} -t . $LISTOPT $IDOPTION + ${PYTHON:-python} -m subunit.run discover -s ${OS_TEST_PATH:-./freezer/tests/unit} -t . $LISTOPT $IDOPTION test_id_option=--load-list $IDFILE test_list_option=--list diff --git a/freezer/tests/integration/common.py b/freezer/tests/integration/common.py index 47883869..7b60292f 100644 --- a/freezer/tests/integration/common.py +++ b/freezer/tests/integration/common.py @@ -53,7 +53,6 @@ def dict_to_args(d): def execute_freezerc(dict, must_fail=False, merge_stderr=False): """ - :param dict: :type dict: dict[str, str] :param must_fail: @@ -218,22 +217,22 @@ class TestFS(unittest.TestCase): To enable the ssh storage testing, the following environment variables need to be defined: - - FREEZER_TEST_SSH_KEY - - FREEZER_TEST_SSH_USERNAME - - FREEZER_TEST_SSH_HOST - - FREEZER_TEST_CONTAINER + - FREEZER_TEST_SSH_KEY + - FREEZER_TEST_SSH_USERNAME + - FREEZER_TEST_SSH_HOST + - FREEZER_TEST_CONTAINER To enable the swift storage testing, the following environment variables need to be defined: - - FREEZER_TEST_OS_TENANT_NAME - - FREEZER_TEST_OS_USERNAME - - FREEZER_TEST_OS_REGION_NAME - - FREEZER_TEST_OS_PASSWORD - - FREEZER_TEST_OS_AUTH_URL + - FREEZER_TEST_OS_TENANT_NAME + - FREEZER_TEST_OS_USERNAME + - FREEZER_TEST_OS_REGION_NAME + - FREEZER_TEST_OS_PASSWORD + - FREEZER_TEST_OS_AUTH_URL Tests involving LVM snapshots are evoided if: - - user is not root - - FREEZER_TEST_NO_LVM is set + - user is not root + - FREEZER_TEST_NO_LVM is set """ ssh_key = os.environ.get('FREEZER_TEST_SSH_KEY') diff --git a/freezer/tests/integration/test_agent.py b/freezer/tests/integration/test_agent.py index c9576487..d96d6c57 100644 --- a/freezer/tests/integration/test_agent.py +++ b/freezer/tests/integration/test_agent.py @@ -43,7 +43,7 @@ class TestBackupFSLocalstorage(common.TestFS): def test_backup_single_level(self): """ - use the default source and destination trees in /tmp - (see common.TestFS) + (see common.TestFS) - use temporary directory for backup storage - add some random data - check that trees don't match anymore @@ -163,11 +163,11 @@ class TestBackupFSLocalstorage(common.TestFS): class TestBackupSSH(common.TestFS): """ Tests are executed if the following env vars are defined: - - FREEZER_TEST_SSH_KEY - - FREEZER_TEST_SSH_USERNAME - - FREEZER_TEST_SSH_HOST - - FREEZER_TEST_CONTAINER - (directory on the remote machine used to store backups) + - FREEZER_TEST_SSH_KEY + - FREEZER_TEST_SSH_USERNAME + - FREEZER_TEST_SSH_HOST + - FREEZER_TEST_CONTAINER + (directory on the remote machine used to store backups) """ @unittest.skipIf(not common.TestFS.use_ssh, @@ -354,11 +354,11 @@ class TestBackupUsingSwiftStorage(common.TestFS): """ Tests are executed if the following env vars are defined: - - FREEZER_TEST_OS_TENANT_NAME - - FREEZER_TEST_OS_USERNAME - - FREEZER_TEST_OS_REGION_NAME - - FREEZER_TEST_OS_PASSWORD - - FREEZER_TEST_OS_AUTH_URL + - FREEZER_TEST_OS_TENANT_NAME + - FREEZER_TEST_OS_USERNAME + - FREEZER_TEST_OS_REGION_NAME + - FREEZER_TEST_OS_PASSWORD + - FREEZER_TEST_OS_AUTH_URL """ @unittest.skipIf(not common.TestFS.use_os, diff --git a/freezer/tests/integration/test_rsync_backup.py b/freezer/tests/integration/test_rsync_backup.py index be43d8ae..90eb95e3 100644 --- a/freezer/tests/integration/test_rsync_backup.py +++ b/freezer/tests/integration/test_rsync_backup.py @@ -24,7 +24,7 @@ class TestBackupFSLocalRsync(common.TestFS): def test_backup_single_level(self): """ - use the default source and destination trees in /tmp - (see common.TestFS) + (see common.TestFS) - use temporary directory for backup storage - add some random data - check that trees don't match anymore @@ -66,7 +66,7 @@ class TestBackupFSLocalRsync(common.TestFS): def test_backup_multiple_level(self): """ - use the default source and destination trees in /tmp - (see common.TestFS) + (see common.TestFS) - use temporary directory for backup storage - add some random data - check that trees don't match anymore @@ -119,7 +119,7 @@ class TestBackupFSLocalRsync(common.TestFS): def test_backup_single_file(self): """ - use the default source and destination trees in /tmp - (see common.TestFS) + (see common.TestFS) - use temporary directory for backup storage - add one file with random data - check that trees don't match anymore diff --git a/setup.cfg b/setup.cfg index 917dae16..e89b15e3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,6 +8,10 @@ home-page = https://wiki.openstack.org/wiki/Freezer license = Apache-2 classifier = Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.5 Development Status :: 5 - Production/Stable Natural Language :: English Environment :: OpenStack