Browse Source

Merge "Run the cli functional tests in openstack ci"

Jenkins 3 years ago
parent
commit
f9c6dd98d0

+ 14
- 1
devstack/gate/post_test_hook.sh View File

@@ -34,4 +34,17 @@ iniset $TEMPEST_CONFIG validation ssh_timeout $BUILD_TIMEOUT
34 34
 iniset $TEMPEST_CONFIG validation network_for_ssh ${PRIVATE_NETWORK_NAME:-"private"}
35 35
 
36 36
 # Run the Designate Tempest tests
37
-sudo ./run_tempest_tests.sh
37
+sudo BASE=$BASE ./run_tempest_tests.sh
38
+
39
+# TODO(pglass) - update cli tests to look in the [auth] section for admin creds
40
+iniset $TEMPEST_CONFIG identity admin_username ${ADMIN_USERNAME:-"admin"}
41
+iniset $TEMPEST_CONFIG identity admin_password $ADMIN_PASSWORD
42
+iniset $TEMPEST_CONFIG identity admin_tenant_name $ADMIN_TENANT_NAME
43
+iniset $TEMPEST_CONFIG identity admin_domain_name ${ADMIN_DOMAIN_NAME:-"Default"}
44
+
45
+# must match the dir where `openstack` is installed
46
+DESIGNATE_CLI_DIR=${DESIGNATE_CLI_DIR:-"$BASE/new/python-designateclient"}
47
+iniset $TEMPEST_CONFIG designateclient directory "$DESIGNATE_CLI_DIR/.venv/bin"
48
+
49
+# Run the python-designateclient functional tests
50
+sudo BASE=$BASE ./run_cli_tests.sh

+ 28
- 0
devstack/gate/run_cli_tests.sh View File

@@ -0,0 +1,28 @@
1
+#!/bin/bash -e
2
+#
3
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
4
+# not use this file except in compliance with the License. You may obtain
5
+# a copy of the License at
6
+#
7
+#      http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+# Unless required by applicable law or agreed to in writing, software
10
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
+# License for the specific language governing permissions and limitations
13
+# under the License.
14
+
15
+DESIGNATE_CLI_DIR=${DESIGNATE_CLI_DIR:-"$BASE/new/python-designateclient"}
16
+TEMPEST_DIR=${TEMPEST_DIR:-"$BASE/new/tempest"}
17
+export TEMPEST_CONFIG=$TEMPEST_DIR/etc/tempest.conf
18
+
19
+pushd $DESIGNATE_CLI_DIR
20
+
21
+# we need the actual openstack executable which is not installed by tox
22
+virtualenv "$DESIGNATE_CLI_DIR/.venv"
23
+source "$DESIGNATE_CLI_DIR/.venv/bin/activate"
24
+pip install python-openstackclient
25
+pip install .
26
+
27
+tox -e functional -- --concurrency 4
28
+popd

+ 3
- 3
devstack/gate/run_tempest_tests.sh View File

@@ -23,10 +23,10 @@ fi
23 23
 echo "Successfully contacted the Designate API"
24 24
 
25 25
 # Where Designate and Tempest code lives
26
-DESIGNATE_DIR=${DESIGNATE_DIR:-/opt/stack/new/designate}
27
-TEMPEST_DIR=${TEMPEST_DIR:-/opt/stack/new/tempest}
28
-
26
+DESIGNATE_DIR=${DESIGNATE_DIR:-"$BASE/new/designate"}
27
+TEMPEST_DIR=${TEMPEST_DIR:-"$BASE/new/tempest"}
29 28
 
30 29
 pushd $DESIGNATE_DIR
31 30
 export TEMPEST_CONFIG=$TEMPEST_DIR/etc/tempest.conf
32 31
 tox -e functional -- --concurrency 4
32
+popd

Loading…
Cancel
Save