From 76502dd57d5212cd7fcd8fcbaf66284ec0d391ba Mon Sep 17 00:00:00 2001 From: Bharat Kunwar Date: Mon, 20 Apr 2020 13:11:53 +0000 Subject: [PATCH] [ci] Use magnum-tempest-plugin-tests-api This commit drops magnum-functional-api (which uses legacy-dsvm-base due to be removed in the V cycle) in favour of magnum-tempest-plugin-tests-api defined in the magnum-tempest-plugins repo (which uses the new devstack-tempest job recommended for running Tempest tests in Zuul v3) for API Tempest tests. Story: 2007561 Task: 39443 Depends-On: https://review.opendev.org/#/c/721077/ Change-Id: I91446f8773ecec1286c9913c3fff688bd8d9a087 --- .zuul.yaml | 12 ++----- magnum/tests/contrib/post_test_hook.sh | 44 ++------------------------ tox.ini | 11 ------- 3 files changed, 5 insertions(+), 62 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 1f97121748..6954d1bd31 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -99,12 +99,6 @@ branch_override: default devstack_python3: 1 -- job: - name: magnum-functional-api - parent: magnum-functional-base - vars: - coe: api - - job: name: magnum-functional-coe parent: magnum-functional-base @@ -298,14 +292,14 @@ - release-notes-jobs-python3 check: jobs: - - magnum-functional-api: - voting: false - openstack-tox-cover: voting: false + - magnum-tempest-plugin-tests-api - magnum-container-build gate: queue: magnum - jobs: [] + jobs: + - magnum-tempest-plugin-tests-api experimental: jobs: - magnum-functional-dcos diff --git a/magnum/tests/contrib/post_test_hook.sh b/magnum/tests/contrib/post_test_hook.sh index 7fb153c0e7..c2adfb40e8 100755 --- a/magnum/tests/contrib/post_test_hook.sh +++ b/magnum/tests/contrib/post_test_hook.sh @@ -181,48 +181,8 @@ create_test_data $coe $special _magnum_tests="" target="${coe}${special}" -if [[ "api" == "$coe" ]]; then - sudo chown -R $USER:stack $BASE/new/tempest - - export TEMPEST_CONFIG=$BASE/new/tempest/etc/tempest.conf - - # Set up tempest config with magnum goodness - iniset $TEMPEST_CONFIG magnum image_id $IMAGE_ID - iniset $TEMPEST_CONFIG magnum nic_id $NIC_ID - iniset $TEMPEST_CONFIG magnum keypair_id default - iniset $TEMPEST_CONFIG magnum flavor_id s1.magnum - iniset $TEMPEST_CONFIG magnum master_flavor_id m1.magnum - iniset $TEMPEST_CONFIG magnum copy_logs True - - # show tempest config with magnum - cat $TEMPEST_CONFIG - # tempest tox env is looking for /etc/tempest/tempest.conf - sudo mkdir -p /etc/tempest - sudo cp $TEMPEST_CONFIG /etc/tempest/tempest.conf - - # strigazi: don't run test_create_list_sign_delete_clusters because - # it is very unstable in the CI - _magnum_tests="magnum_tempest_plugin.tests.api.v1.test_bay" - _magnum_tests="$_magnum_tests magnum_tempest_plugin.tests.api.v1.test_baymodel" - _magnum_tests="$_magnum_tests magnum_tempest_plugin.tests.api.v1.test_cluster_template" - _magnum_tests="$_magnum_tests magnum_tempest_plugin.tests.api.v1.test_cluster_template_admin" - _magnum_tests="$_magnum_tests magnum_tempest_plugin.tests.api.v1.test_magnum_service" - _magnum_tests="$_magnum_tests magnum_tempest_plugin.tests.api.v1.test_cluster.ClusterTest.test_create_cluster_for_nonexisting_cluster_template" - _magnum_tests="$_magnum_tests magnum_tempest_plugin.tests.api.v1.test_cluster.ClusterTest.test_create_cluster_with_node_count_0" - _magnum_tests="$_magnum_tests magnum_tempest_plugin.tests.api.v1.test_cluster.ClusterTest.test_create_cluster_with_nonexisting_flavor" - _magnum_tests="$_magnum_tests magnum_tempest_plugin.tests.api.v1.test_cluster.ClusterTest.test_create_cluster_with_zero_masters" - _magnum_tests="$_magnum_tests magnum_tempest_plugin.tests.api.v1.test_cluster.ClusterTest.test_delete_cluster_for_nonexisting_cluster" - _magnum_tests="$_magnum_tests magnum_tempest_plugin.tests.api.v1.test_cluster.ClusterTest.test_update_cluster_for_nonexisting_cluster" - - pushd $BASE/new/magnum-tempest-plugin - sudo cp $CREDS_FILE . - sudo -E -H -u $USER tox -e functional-"$target" $_magnum_tests - EXIT_CODE=$? - popd -else - sudo -E -H -u $USER tox -e functional-"$target" $_magnum_tests -- --concurrency=1 - EXIT_CODE=$? -fi +sudo -E -H -u $USER tox -e functional-"$target" $_magnum_tests -- --concurrency=1 +EXIT_CODE=$? # Delete the keypair used in the functional test. diff --git a/tox.ini b/tox.ini index 8f8b1da201..679ec62971 100644 --- a/tox.ini +++ b/tox.ini @@ -27,17 +27,6 @@ commands = [testenv:debug] commands = oslo_debug_helper -t magnum/tests/unit {posargs} -[testenv:functional-api] -sitepackages = True -setenv = {[testenv]setenv} - OS_TEST_PATH=./magnum/tests/functional/api - OS_TEST_TIMEOUT=7200 -deps = - {[testenv]deps} -commands = - find . -type f -name "*.py[c|o]" -delete - stestr run {posargs} - [testenv:functional-k8s] sitepackages = True setenv = {[testenv]setenv}