[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
This commit is contained in:
Bharat Kunwar 2020-04-20 13:11:53 +00:00
parent 9fedb8fe43
commit 76502dd57d
3 changed files with 5 additions and 62 deletions

View File

@ -99,12 +99,6 @@
branch_override: default branch_override: default
devstack_python3: 1 devstack_python3: 1
- job:
name: magnum-functional-api
parent: magnum-functional-base
vars:
coe: api
- job: - job:
name: magnum-functional-coe name: magnum-functional-coe
parent: magnum-functional-base parent: magnum-functional-base
@ -298,14 +292,14 @@
- release-notes-jobs-python3 - release-notes-jobs-python3
check: check:
jobs: jobs:
- magnum-functional-api:
voting: false
- openstack-tox-cover: - openstack-tox-cover:
voting: false voting: false
- magnum-tempest-plugin-tests-api
- magnum-container-build - magnum-container-build
gate: gate:
queue: magnum queue: magnum
jobs: [] jobs:
- magnum-tempest-plugin-tests-api
experimental: experimental:
jobs: jobs:
- magnum-functional-dcos - magnum-functional-dcos

View File

@ -181,48 +181,8 @@ create_test_data $coe $special
_magnum_tests="" _magnum_tests=""
target="${coe}${special}" target="${coe}${special}"
if [[ "api" == "$coe" ]]; then sudo -E -H -u $USER tox -e functional-"$target" $_magnum_tests -- --concurrency=1
sudo chown -R $USER:stack $BASE/new/tempest EXIT_CODE=$?
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
# Delete the keypair used in the functional test. # Delete the keypair used in the functional test.

11
tox.ini
View File

@ -27,17 +27,6 @@ commands =
[testenv:debug] [testenv:debug]
commands = oslo_debug_helper -t magnum/tests/unit {posargs} 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] [testenv:functional-k8s]
sitepackages = True sitepackages = True
setenv = {[testenv]setenv} setenv = {[testenv]setenv}