Skip to content

Commit

Permalink
fix tempest
Browse files Browse the repository at this point in the history
  • Loading branch information
ricolin committed Nov 28, 2024
1 parent 269379f commit b0fb562
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 26 deletions.
33 changes: 32 additions & 1 deletion hack/run-tempest-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,40 @@ if [[ ${UPGRADE_KUBE_TAG} != ${KUBE_TAG} ]]; then
${UPGRADE_IMAGE_NAME}
fi

mkdir /tmp/magnum-nodes

pushd /opt/stack/tempest
echo "Tempest configs:"

cat <<EOF >> /opt/stack/tempest/etc/tempest.conf
[magnum]
flavor_id = m1.large
master_flavor_id = m1.large
copy_logs = true
network_driver = ${NETWORK_DRIVER}
image_id = ${IMAGE_OS}-kube-${KUBE_TAG}
coe = kubernetes
labels = '{"kube_tag": "${KUBE_TAG}", "fixed_subnet_cidr": "10.0.0.0/26"}'
docker_storage_driver = overlay2
EOF

if [ ! -d /opt/stack/magnum-tempest-plugin ]; then
git clone https://github.com/openstack/magnum-tempest-plugin /opt/stack/magnum-tempest-plugin
fi

# install magnum-tempest-plugin
pushd /opt/stack/magnum-tempest-plugin
$HOME/.local/bin/pip3 install -e .
popd

echo "Run Tempest against configs:"
cat /opt/stack/tempest/etc/tempest.conf

echo "Run Tempest tests:"
/opt/stack/data/venv/bin/tempest run -r '(^magnum_tempest_plugin)' \
--exclude-regex '^magnum_tempest_plugin.tests.api.v1.test_cluster.ClusterTest\.(test_create_cluster_with_zero_nodes|test_create_list_sign_delete_clusters)'
--exclude-regex '^magnum_tempest_plugin.tests.api.v1.test_cluster.ClusterTest.test_create_cluster_with_zero_nodes'
popd


Expand Down
9 changes: 0 additions & 9 deletions hack/stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,5 @@ EOF
pip install -U setuptools pip python-magnumclient
$HOME/.local/bin/pip3 install -e .

# install magnum-tempest-plugin with fix
git clone https://github.com/openstack/magnum-tempest-plugin /opt/stack/magnum-tempest-plugin
pushd /opt/stack/magnum-tempest-plugin
git fetch https://review.opendev.org/openstack/magnum-tempest-plugin refs/changes/41/935741/1 && git checkout FETCH_HEAD
source /opt/stack/data/venv/bin/activate
#$HOME/.local/bin/pip3 install -e .
pip install .
popd

# Restart Magnum to pick-up new driver
sudo systemctl restart devstack@magnum-{api,cond}
1 change: 0 additions & 1 deletion zuul.d/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
abstract: true
timeout: 7200
run: zuul.d/playbooks/tempest/run.yml
post-run: zuul.d/playbooks/tempest/post.yml
nodeset:
nodes:
- name: ubuntu-jammy
Expand Down
9 changes: 0 additions & 9 deletions zuul.d/playbooks/tempest/post.yml

This file was deleted.

6 changes: 0 additions & 6 deletions zuul.d/playbooks/tempest/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,3 @@
BUILD_NEW_IMAGE: "{{ fetch_artifact.changed }}"
BUILD_NEW_UPGRADE_IMAGE: "{{ fetch_artifact_upgrade.changed }}"
NETWORK_DRIVER: "{{ network_driver }}"

- name: Copy Tempest results to output folder
copy:
src: "/opt/stack/tempest/tempest.log"
dest: "{{ zuul_output_dir }}/artifacts/tempest.log"
remote_src: true

0 comments on commit b0fb562

Please sign in to comment.