The freezer.tests.integration.common
Module¶
-
exception
freezer.tests.integration.common.
CommandFailed
(returncode, cmd, output, stderr)[source]¶ Bases:
exceptions.Exception
-
class
freezer.tests.integration.common.
Temp_Tree
(suffix='', dir=None, create=True)[source]¶ Bases:
object
-
add_random_data
(ndir=5, nfile=5, size=1024)[source]¶ add some files containing random data
Parameters: - ndir – number of dirs to create
- nfile – number of files to create in each dir
- size – size of files
Returns: None
-
get_file_list
()[source]¶ walks the dir tree and creates a list of relative pathnames :return: list of relative file paths
-
-
class
freezer.tests.integration.common.
TestFS
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Utility class for setting up the tests.
Type of tests depends (also) on the environment variables defined.
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
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
- Tests involving LVM snapshots are evoided if:
- user is not root
- FREEZER_TEST_NO_LVM is set
-
container
= None¶
-
openstack_executable
= '/home/zuul/.venv/bin/openstack'¶
-
os_auth_url
= None¶
-
os_password
= None¶
-
os_region
= None¶
-
os_tenant_name
= None¶
-
os_user_name
= None¶
-
ssh_executable
= '/usr/bin/ssh'¶
-
ssh_host
= None¶
-
ssh_key
= None¶
-
ssh_username
= None¶
-
swift_executable
= '/home/zuul/.venv/bin/swift'¶
-
use_lvm
= False¶
-
use_os
= None¶
-
use_ssh
= None¶