diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/ci/clean_images.sh | 2 | ||||
-rwxr-xr-x | tests/ci/load_images.sh | 14 | ||||
-rwxr-xr-x | tests/ci/prepare_storperf_admin-rc.sh | 1 | ||||
-rw-r--r-- | tests/unit/apiserver/resources/test_env_action.py | 2 | ||||
-rw-r--r-- | tests/unit/apiserver/utils/test_common.py | 25 | ||||
-rw-r--r-- | tests/unit/cmd/commands/test_env.py | 2 |
6 files changed, 15 insertions, 31 deletions
diff --git a/tests/ci/clean_images.sh b/tests/ci/clean_images.sh index b3363cb12..832ade252 100755 --- a/tests/ci/clean_images.sh +++ b/tests/ci/clean_images.sh @@ -25,7 +25,7 @@ cleanup() return fi - for image in $(openstack ${SECURE} image list | grep -e cirros-0.3.5 -e yardstick-image -e Ubuntu-16.04 \ + for image in $(openstack ${SECURE} image list | grep -e cirros-0.3.5 -e cirros-d161201 -e yardstick-image -e Ubuntu-16.04 \ | awk '{print $2}'); do echo "Deleting image $image..." openstack ${SECURE} image delete $image || true diff --git a/tests/ci/load_images.sh b/tests/ci/load_images.sh index 29d73dcbc..c2ae4fe7b 100755 --- a/tests/ci/load_images.sh +++ b/tests/ci/load_images.sh @@ -150,13 +150,21 @@ load_yardstick_image() load_cirros_image() { - if [[ -n $(openstack ${SECURE} image list | grep -e Cirros-0.3.5) ]]; then - echo "Cirros-0.3.5 image already exist, skip loading cirros image" + if [[ "${YARD_IMG_ARCH}" == "arm64" ]]; then + CIRROS_IMAGE_VERSION="cirros-d161201" + CIRROS_IMAGE_PATH="/home/opnfv/images/cirros-d161201-aarch64-disk.img" + else + CIRROS_IMAGE_VERSION="Cirros-0.3.5" + CIRROS_IMAGE_PATH="/home/opnfv/images/cirros-0.3.5-x86_64-disk.img" + fi + + if [[ -n $(openstack ${SECURE} image list | grep -e "${CIRROS_IMAGE_VERSION}") ]]; then + echo "${CIRROS_IMAGE_VERSION} image already exist, skip loading cirros image" else echo echo "========== Loading cirros cloud image ==========" - local image_file=/home/opnfv/images/cirros-0.3.5-x86_64-disk.img + local image_file="${CIRROS_IMAGE_PATH}" EXTRA_PARAMS="" # VPP requires guest memory to be backed by large pages diff --git a/tests/ci/prepare_storperf_admin-rc.sh b/tests/ci/prepare_storperf_admin-rc.sh index 979728e84..558375e62 100755 --- a/tests/ci/prepare_storperf_admin-rc.sh +++ b/tests/ci/prepare_storperf_admin-rc.sh @@ -35,3 +35,4 @@ echo "OS_TENANT_ID="$TENANT_ID >> ~/storperf_admin-rc echo "OS_USER_DOMAIN_ID="$USER_DOMAIN_ID >> ~/storperf_admin-rc echo "OS_PROJECT_DOMAIN_NAME="$OS_PROJECT_DOMAIN_NAME >> ~/storperf_admin-rc echo "OS_USER_DOMAIN_NAME="$OS_USER_DOMAIN_NAME >> ~/storperf_admin-rc +echo "TEST_DB_URL=http://testresults.opnfv.org/test/api/v1" >> ~/storperf_admin-rc diff --git a/tests/unit/apiserver/resources/test_env_action.py b/tests/unit/apiserver/resources/test_env_action.py index c7ae10a20..d61092dbc 100644 --- a/tests/unit/apiserver/resources/test_env_action.py +++ b/tests/unit/apiserver/resources/test_env_action.py @@ -18,7 +18,7 @@ class EnvTestCase(APITestCase): def test_create_grafana(self): url = 'yardstick/env/action' - data = {'action': 'createGrafanaContainer'} + data = {'action': 'create_grafana'} resp = self._post(url, data) time.sleep(1) diff --git a/tests/unit/apiserver/utils/test_common.py b/tests/unit/apiserver/utils/test_common.py index acf6e41b1..ad81cb76b 100644 --- a/tests/unit/apiserver/utils/test_common.py +++ b/tests/unit/apiserver/utils/test_common.py @@ -33,31 +33,6 @@ class TranslateToStrTestCase(unittest.TestCase): self.assertEqual(result, output_str) -class GetCommandListTestCase(unittest.TestCase): - - def test_get_command_list_no_opts(self): - command_list = ['a'] - opts = {} - args = 'b' - output_list = common.get_command_list(command_list, opts, args) - - result_list = ['a', 'b'] - self.assertEqual(result_list, output_list) - - def test_get_command_list_with_opts_args(self): - command_list = ['a'] - opts = { - 'b': 'c', - 'task-args': 'd' - } - args = 'e' - - output_list = common.get_command_list(command_list, opts, args) - - result_list = ['a', 'e', '--b', '--task-args', 'd'] - self.assertEqual(result_list, output_list) - - def main(): unittest.main() diff --git a/tests/unit/cmd/commands/test_env.py b/tests/unit/cmd/commands/test_env.py index c6e0e1d20..73cd5af47 100644 --- a/tests/unit/cmd/commands/test_env.py +++ b/tests/unit/cmd/commands/test_env.py @@ -42,7 +42,7 @@ class EnvCommandTestCase(unittest.TestCase): @mock.patch('yardstick.cmd.commands.env.HttpClient.post') def test_start_async_task(self, post_mock): - data = {'action': 'createGrafanaContainer'} + data = {'action': 'create_grafana'} EnvCommand()._start_async_task(data) self.assertTrue(post_mock.called) |