Merge "Pass more accurate error message to DeleteErrorException"
diff --git a/.zuul.yaml b/.zuul.yaml
index 462501e..5bec9f9 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -418,6 +418,7 @@
- opendev.org/openstack/senlin-tempest-plugin
- opendev.org/openstack/solum-tempest-plugin
- opendev.org/x/tap-as-a-service
+ - opendev.org/x/tap-as-a-service-tempest-plugin
- opendev.org/openstack/telemetry-tempest-plugin
- opendev.org/openstack/tempest-horizon
- opendev.org/x/tobiko
@@ -428,6 +429,7 @@
- opendev.org/openstack/vitrage-tempest-plugin
- opendev.org/x/vmware-nsx-tempest-plugin
- opendev.org/openstack/watcher-tempest-plugin
+ - opendev.org/x/whitebox-tempest-plugin
- opendev.org/openstack/zaqar-tempest-plugin
- opendev.org/openstack/zun-tempest-plugin
diff --git a/tempest/api/compute/servers/test_novnc.py b/tempest/api/compute/servers/test_novnc.py
index daf6a06..50ffb21 100644
--- a/tempest/api/compute/servers/test_novnc.py
+++ b/tempest/api/compute/servers/test_novnc.py
@@ -16,6 +16,7 @@
import struct
import six
+import six.moves.urllib.parse as urlparse
import urllib3
from tempest.api.compute import base
@@ -73,8 +74,9 @@
'initial call: ' + six.text_type(resp.status))
# Do some basic validation to make sure it is an expected HTML document
resp_data = resp.data.decode()
- self.assertIn('<html>', resp_data,
- 'Not a valid html document in the response.')
+ # This is needed in the case of example: <html lang="en">
+ self.assertRegex(resp_data, '<html.*>',
+ 'Not a valid html document in the response.')
self.assertIn('</html>', resp_data,
'Not a valid html document in the response.')
# Just try to make sure we got JavaScript back for noVNC, since we
@@ -204,7 +206,18 @@
type='novnc')['console']
self.assertEqual('novnc', body['type'])
# Do the WebSockify HTTP Request to novncproxy with a bad token
- url = body['url'].replace('token=', 'token=bad')
+ parts = urlparse.urlparse(body['url'])
+ qparams = urlparse.parse_qs(parts.query)
+ if 'path' in qparams:
+ qparams['path'] = urlparse.unquote(qparams['path'][0]).replace(
+ 'token=', 'token=bad')
+ elif 'token' in qparams:
+ qparams['token'] = 'bad' + qparams['token'][0]
+ new_query = urlparse.urlencode(qparams)
+ new_parts = urlparse.ParseResult(parts.scheme, parts.netloc,
+ parts.path, parts.params, new_query,
+ parts.fragment)
+ url = urlparse.urlunparse(new_parts)
self._websocket = compute.create_websocket(url)
# Make sure the novncproxy rejected the connection and closed it
data = self._websocket.receive_frame()
diff --git a/tempest/common/compute.py b/tempest/common/compute.py
index 1489e60..4ac92d9 100644
--- a/tempest/common/compute.py
+++ b/tempest/common/compute.py
@@ -392,8 +392,11 @@
def _upgrade(self, url):
"""Upgrade the HTTP connection to a WebSocket and verify."""
- # The real request goes to the /websockify URI always
- reqdata = 'GET /websockify HTTP/1.1\r\n'
+ # It is possible to pass the path as a query parameter in the request,
+ # so use it if present
+ qparams = urlparse.parse_qs(url.query)
+ path = qparams['path'][0] if 'path' in qparams else '/websockify'
+ reqdata = 'GET %s HTTP/1.1\r\n' % path
reqdata += 'Host: %s' % url.hostname
# Add port only if we have one specified
if url.port:
@@ -402,7 +405,7 @@
reqdata += '\r\n'
# Tell the HTTP Server to Upgrade the connection to a WebSocket
reqdata += 'Upgrade: websocket\r\nConnection: Upgrade\r\n'
- # The token=xxx is sent as a Cookie not in the URI
+ # The token=xxx is sent as a Cookie not in the URI for noVNC < v1.1.0
reqdata += 'Cookie: %s\r\n' % url.query
# Use a hard-coded WebSocket key since a test program
reqdata += 'Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==\r\n'
diff --git a/tools/generate-tempest-plugins-list.py b/tools/generate-tempest-plugins-list.py
index 746cb34..55cda97 100644
--- a/tools/generate-tempest-plugins-list.py
+++ b/tools/generate-tempest-plugins-list.py
@@ -47,15 +47,10 @@
'''
-def is_in_openstack_namespace(proj):
- return proj.startswith('openstack/')
-
# Rather than returning a 404 for a nonexistent file, cgit delivers a
# 0-byte response to a GET request. It also does not provide a
# Content-Length in a HEAD response, so the way we tell if a file exists
# is to check the length of the entire GET response body.
-
-
def has_tempest_plugin(proj):
try:
r = urllib.urlopen(
@@ -76,19 +71,33 @@
# cross-site scripting attacks. Therefore we must discard it so the
# json library won't choke.
content = r.read().decode('utf-8')[4:]
-projects = sorted(filter(is_in_openstack_namespace, json.loads(content)))
+projects = sorted(json.loads(content))
-# Retrieve projects having no deb, puppet, ui or spec namespace as those
+# Retrieve projects having no deployment tool repo (such as deb,
+# puppet, ansible, etc.), infra repos, ui or spec namespace as those
# namespaces do not contains tempest plugins.
projects_list = [i for i in projects if not (
+ i.startswith('openstack-dev/') or
+ i.startswith('openstack-infra/') or
+ i.startswith('openstack/ansible-') or
+ i.startswith('openstack/charm-') or
+ i.startswith('openstack/cookbook-openstack-') or
+ i.startswith('openstack/devstack-') or
+ i.startswith('openstack/fuel-') or
i.startswith('openstack/deb-') or
i.startswith('openstack/puppet-') or
+ i.startswith('openstack/openstack-ansible-') or
+ i.startswith('x/deb-') or
+ i.startswith('x/fuel-') or
+ i.startswith('x/python-') or
+ i.startswith('zuul/') or
i.endswith('-ui') or
i.endswith('-specs'))]
found_plugins = list(filter(has_tempest_plugin, projects_list))
-# Every element of the found_plugins list begins with "openstack/".
-# We drop those initial 10 octets when printing the list.
+# We have tempest plugins not only in 'openstack/' namespace but also the
+# other name spaces such as 'airship/', 'x/', etc.
+# So, we print all of them here.
for project in found_plugins:
- print(project[10:])
+ print(project)
diff --git a/tools/generate-tempest-plugins-list.sh b/tools/generate-tempest-plugins-list.sh
index b4e5430..c0d47a1 100755
--- a/tools/generate-tempest-plugins-list.sh
+++ b/tools/generate-tempest-plugins-list.sh
@@ -69,8 +69,8 @@
i=0
for plugin in ${sorted_plugins}; do
i=$((i+1))
- giturl="https://opendev.org/openstack/${plugin}"
- gitlink="https://opendev.org/openstack/${plugin}"
+ giturl="https://opendev.org/${plugin}"
+ gitlink="https://opendev.org/cgit/${plugin}"
printf "%-3s %-${name_col_len}s %s\n" "$i" "${plugin}" "\`${giturl} <${gitlink}>\`__"
done
diff --git a/tools/tempest-plugin-sanity.sh b/tools/tempest-plugin-sanity.sh
index 47a9ac9..d38687e 100644
--- a/tools/tempest-plugin-sanity.sh
+++ b/tools/tempest-plugin-sanity.sh
@@ -48,8 +48,10 @@
# TODO(masayukig): Some of these can be removed from BLACKLIST in the future.
# barbican-tempest-plugin: https://review.opendev.org/#/c/634631/
# cyborg-tempest-plugin: https://review.opendev.org/659687
+# gce-api: It looks gce-api doesn't support python3 yet.
# intel-nfv-ci-tests: https://review.opendev.org/#/c/634640/
# networking-ansible: https://review.opendev.org/#/c/634647/
+# networking-bgpvpn: https://review.opendev.org/#/c/662142/
# networking-generic-switch: https://review.opendev.org/#/c/634846/
# networking-l2gw-tempest-plugin: https://review.opendev.org/#/c/635093/
# networking-midonet: https://review.opendev.org/#/c/635096/
@@ -61,19 +63,21 @@
# valet: https://review.opendev.org/#/c/638339/
BLACKLIST="
-barbican-tempest-plugin
-cyborg-tempest-plugin
-intel-nfv-ci-tests
-networking-ansible
-networking-generic-switch
-networking-l2gw-tempest-plugin
-networking-midonet
-networking-plumgrid
-networking-spp
-neutron-dynamic-routing
-neutron-vpnaas
-nova-lxd
-valet
+openstack/barbican-tempest-plugin
+openstack/cyborg-tempest-plugin
+x/gce-api
+x/intel-nfv-ci-tests
+x/networking-ansible
+openstack/networking-bgpvpn
+openstack/networking-generic-switch
+openstack/networking-l2gw-tempest-plugin
+openstack/networking-midonet
+x/networking-plumgrid
+x/networking-spp
+openstack/neutron-dynamic-routing
+openstack/neutron-vpnaas
+x/nova-lxd
+x/valet
"
# Function to clone project using zuul-cloner or from git
@@ -81,11 +85,11 @@
if [ -e /usr/zuul-env/bin/zuul-cloner ]; then
/usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \
https://opendev.org \
- openstack/"$1"
+ "$1"
elif [ -e /usr/bin/git ]; then
- /usr/bin/git clone https://opendev.org/openstack/"$1" \
- openstack/"$1"
+ /usr/bin/git clone https://opendev.org/"$1" \
+ "$1"
fi
}
@@ -103,10 +107,10 @@
# Function to install project
function install_project() {
- "$TVENV" pip install "$SANITY_DIR"/openstack/"$1"
+ "$TVENV" pip install "$SANITY_DIR"/"$1"
# Check for test-requirements.txt file in a project then install it.
- if [ -e "$SANITY_DIR"/openstack/"$1"/test-requirements.txt ]; then
- "$TVENV" pip install -r "$SANITY_DIR"/openstack/"$1"/test-requirements.txt
+ if [ -e "$SANITY_DIR"/"$1"/test-requirements.txt ]; then
+ "$TVENV" pip install -r "$SANITY_DIR"/"$1"/test-requirements.txt
fi
}
@@ -124,7 +128,7 @@
# Remove the sanity workspace in case of remaining
rm -fr "$SANITY_DIR"/tempest_sanity
# Remove the project directory after sanity run
- rm -fr "$SANITY_DIR"/openstack/"$1"
+ rm -fr "$SANITY_DIR"/"$1"
return $retval
}