Update post_test_hook to use multinode environment.
Now that a new infra job has been added to Patrole for a
multinode environment [0], the post_test_hook in Patrole
needs to be updated.
This change will still keep "fast" tests in the "fast" gates,
although they have been renamed to not have the "fast" substring;
and it will still keep "slow" tests in the "slow" gates,
although they have been renamed with "multinode" instead of "slow".
This means that tests that require multiple nodes, like migrating
a server, can be run, rather than skipped.
[0] https://review.openstack.org/#/c/450278/
Change-Id: I278695026ce273daa8cb44e9c472cf84e880a618
diff --git a/contrib/post_test_hook.sh b/contrib/post_test_hook.sh
index 2eb494f..085b5b1 100644
--- a/contrib/post_test_hook.sh
+++ b/contrib/post_test_hook.sh
@@ -26,12 +26,9 @@
TEMPEST_CONFIG=$BASE/new/tempest/etc/tempest.conf
TEMPEST_COMMAND="sudo -H -u tempest tox"
-# TODO(felipemonteiro): This regex does a negative lookahead to exclude slow
-# tests that contain the @test.attr(type='slow') decorator above them. Slower
-# tests will execute those tests in a separate gate, which will require
-# future modification of this script.
-DEVSTACK_FAST_GATE_TEMPEST_REGEX="(?!.*\[.*\bslow\b.*\])(^patrole_tempest_plugin\.tests\.api)"
-DEVSTACK_SLOW_GATE_TEMPEST_REGEX="(?=.*\[.*\bslow\b.*\])(^patrole_tempest_plugin\.tests\.api)"
+
+DEVSTACK_GATE_TEMPEST_REGEX="(?!.*\[.*\bslow\b.*\])(^patrole_tempest_plugin\.tests\.api)"
+DEVSTACK_MULTINODE_GATE_TEMPEST_REGEX="(?=.*\[.*\bslow\b.*\])(^patrole_tempest_plugin\.tests\.api)"
# Import devstack function 'iniset'.
source $BASE/new/devstack/functions
@@ -49,8 +46,8 @@
RBAC_ROLE="Member"
fi
-# Second argument is expected to contain value to indicate whether it is
-# a "fast' or "slow test" gate
+# Second argument is expected to contain value indicating whether the
+# environment is "multinode" or not (empty string).
TYPE=$2
# Set enable_rbac=True under [rbac] section in tempest.conf
@@ -73,11 +70,10 @@
# cd into Tempest directory before executing tox.
cd $BASE/new/tempest
-# Select Fast Gate if Type is set to 'fast', else use 'slow' gate
-if [[ "$TYPE" == "fast" ]]; then
- $TEMPEST_COMMAND -eall-plugin -- $DEVSTACK_FAST_GATE_TEMPEST_REGEX --concurrency=$TEMPEST_CONCURRENCY
+if [[ "$TYPE" == "multinode" ]]; then
+ $TEMPEST_COMMAND -eall-plugin -- $DEVSTACK_MULTINODE_GATE_TEMPEST_REGEX --concurrency=$TEMPEST_CONCURRENCY
else
- $TEMPEST_COMMAND -eall-plugin -- $DEVSTACK_SLOW_GATE_TEMPEST_REGEX --concurrency=$TEMPEST_CONCURRENCY
+ $TEMPEST_COMMAND -eall-plugin -- $DEVSTACK_GATE_TEMPEST_REGEX --concurrency=$TEMPEST_CONCURRENCY
fi
sudo -H -u tempest .tox/all-plugin/bin/tempest list-plugins