summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Mendizábal <dmendiza@redhat.com>2020-07-29 15:28:58 +0200
committerLuigi Toscano <ltoscano@redhat.com>2020-07-29 15:29:39 +0200
commit1f0feb30ccd3b19bc23453d85d3266c85fcf04d6 (patch)
tree688677d6d86b89e9e85704488fe703adc96d6843
parent72dedebbfad32278009bbfbfb453309a82cb9e7d (diff)
downloadpython-barbicanclient-1f0feb30ccd3b19bc23453d85d3266c85fcf04d6.tar.gz
Zuul: port to native v3 job and add victoria unit testsvictoria-em5.0.1
Port the functional job to the native Zuul v3 format, and remove a few old wrapper scripts which are not needed anymore (the tests can be run locally through `tox -efunctional` as well). Also, switch to the Victoria run time for unit tests. Co-Authored-By: Luigi Toscano <ltoscano@redhat.com> Change-Id: Ibce326044c240d6c4e7f1ca3c3ac50a18282a86d
-rw-r--r--.zuul.yaml16
-rwxr-xr-xfunctionaltests/post_test_hook.sh24
-rwxr-xr-xfunctionaltests/run_tests.sh20
-rw-r--r--playbooks/python-barbicanclient-dsvm/post.yaml15
-rw-r--r--playbooks/python-barbicanclient-dsvm/run.yaml64
5 files changed, 8 insertions, 131 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index fbf99c8..849f57f 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -1,25 +1,25 @@
- job:
- name: python-barbicanclient-dsvm
- parent: legacy-dsvm-base
- run: playbooks/python-barbicanclient-dsvm/run.yaml
- post-run: playbooks/python-barbicanclient-dsvm/post.yaml
+ name: python-barbicanclient-tox-functional
+ parent: devstack-tox-functional
timeout: 4200
required-projects:
- - openstack/devstack-gate
- openstack/barbican
- openstack/barbican-tempest-plugin
- openstack/python-barbicanclient
+ vars:
+ devstack_plugins:
+ barbican: https://opendev.org/openstack/barbican
- project:
templates:
- check-requirements
- openstack-lower-constraints-jobs
- - openstack-python3-ussuri-jobs
+ - openstack-python3-victoria-jobs
- openstackclient-plugin-jobs
- publish-openstack-docs-pti
check:
jobs:
- - python-barbicanclient-dsvm
+ - python-barbicanclient-tox-functional
gate:
jobs:
- - python-barbicanclient-dsvm
+ - python-barbicanclient-tox-functional
diff --git a/functionaltests/post_test_hook.sh b/functionaltests/post_test_hook.sh
deleted file mode 100755
index d150635..0000000
--- a/functionaltests/post_test_hook.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-# This script is executed inside post_test_hook function in devstack gate.
-
-# Install packages from test-requirements.txt
-sudo pip install -r /opt/stack/new/python-barbicanclient/test-requirements.txt
-
-# Make sure we're running the trunk client before we run the tests
-sudo pip install -U /opt/stack/new/python-barbicanclient
-
-cd /opt/stack/new/python-barbicanclient/functionaltests
-sudo ./run_tests.sh
diff --git a/functionaltests/run_tests.sh b/functionaltests/run_tests.sh
deleted file mode 100755
index 214d0b1..0000000
--- a/functionaltests/run_tests.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-# Install test-requirements
-pip install -r /opt/stack/new/python-barbicanclient/test-requirements.txt
-
-echo "Running functional tests on $(python -V)"
-
-nosetests -v .
diff --git a/playbooks/python-barbicanclient-dsvm/post.yaml b/playbooks/python-barbicanclient-dsvm/post.yaml
deleted file mode 100644
index e07f551..0000000
--- a/playbooks/python-barbicanclient-dsvm/post.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-- hosts: primary
- tasks:
-
- - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
- synchronize:
- src: '{{ ansible_user_dir }}/workspace/'
- dest: '{{ zuul.executor.log_root }}'
- mode: pull
- copy_links: true
- verify_host: true
- rsync_opts:
- - --include=/logs/**
- - --include=*/
- - --exclude=*
- - --prune-empty-dirs
diff --git a/playbooks/python-barbicanclient-dsvm/run.yaml b/playbooks/python-barbicanclient-dsvm/run.yaml
deleted file mode 100644
index d30ce34..0000000
--- a/playbooks/python-barbicanclient-dsvm/run.yaml
+++ /dev/null
@@ -1,64 +0,0 @@
-- hosts: all
- name: Autoconverted job legacy-python-barbicanclient-dsvm from old job gate-python-barbicanclient-dsvm-ubuntu-xenial
- tasks:
-
- - name: Ensure legacy workspace directory
- file:
- path: '{{ ansible_user_dir }}/workspace'
- state: directory
-
- - shell:
- cmd: |
- set -e
- set -x
- cat > clonemap.yaml << EOF
- clonemap:
- - name: openstack/devstack-gate
- dest: devstack-gate
- EOF
- /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
- https://opendev.org \
- openstack/devstack-gate
- executable: /bin/bash
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
-
- - shell:
- cmd: |
- set -e
- set -x
- cat << 'EOF' >>"/tmp/dg-local.conf"
- [[local|localrc]]
- enable_plugin barbican https://opendev.org/openstack/barbican
-
- EOF
- executable: /bin/bash
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'
-
- - shell:
- cmd: |
- set -e
- set -x
- export PYTHONUNBUFFERED=true
- export OVERRIDE_ENABLED_SERVICES=tempest,rabbit,mysql,key
- export PROJECTS="openstack/barbican $PROJECTS"
- export PROJECTS="openstack/python-barbicanclient $PROJECTS"
- export PROJECTS="openstack/barbican-tempest-plugin $PROJECTS"
-
- function gate_hook {
- $BASE/new/barbican/devstack/gate_hook.sh
- }
- export -f gate_hook
-
- function post_test_hook {
- cd /opt/stack/new/python-barbicanclient/functionaltests
- ./post_test_hook.sh
- }
- export -f post_test_hook
-
- cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
- ./safe-devstack-vm-gate-wrap.sh
- executable: /bin/bash
- chdir: '{{ ansible_user_dir }}/workspace'
- environment: '{{ zuul | zuul_legacy_vars }}'