py3: Add swift-tox-func-encryption-py37 gate job

Change-Id: Ia9ae0fc226dfc9b40157faebac100c10a9180c62
This commit is contained in:
Tim Burke
2019-08-06 10:00:41 -07:00
parent ab19241534
commit 2c727f65ff
3 changed files with 29 additions and 1 deletions

View File

@@ -96,6 +96,18 @@
bindep_profile: test py37 bindep_profile: test py37
python_version: 3.7 python_version: 3.7
- job:
name: swift-tox-func-encryption-py37
parent: swift-tox-func-py37
description: |
Run functional tests for swift under cPython version 3.7.
Uses tox with the ``func-encryption-py3`` environment.
It sets TMPDIR to an XFS mount point created via
tools/test-setup.sh.
vars:
tox_envlist: func-encryption-py3
- job: - job:
name: swift-tox-func-ec-py37 name: swift-tox-func-ec-py37
parent: swift-tox-func-py37 parent: swift-tox-func-py37
@@ -454,6 +466,11 @@
- ^(api-ref|doc|releasenotes)/.*$ - ^(api-ref|doc|releasenotes)/.*$
- ^test/probe/.*$ - ^test/probe/.*$
- ^(.gitreview|.mailmap|AUTHORS|CHANGELOG)$ - ^(.gitreview|.mailmap|AUTHORS|CHANGELOG)$
- swift-tox-func-encryption-py37:
irrelevant-files:
- ^(api-ref|doc|releasenotes)/.*$
- ^test/probe/.*$
- ^(.gitreview|.mailmap|AUTHORS|CHANGELOG)$
- swift-tox-func-domain-remap-staticweb-py37: - swift-tox-func-domain-remap-staticweb-py37:
irrelevant-files: irrelevant-files:
- ^(api-ref|doc|releasenotes)/.*$ - ^(api-ref|doc|releasenotes)/.*$
@@ -536,6 +553,7 @@
- swift-tox-func-ec - swift-tox-func-ec
- swift-tox-func-s3api - swift-tox-func-s3api
- swift-tox-func-py37 - swift-tox-func-py37
- swift-tox-func-encryption
- swift-tox-func-domain-remap-staticweb-py37 - swift-tox-func-domain-remap-staticweb-py37
- swift-tox-func-ec-py37 - swift-tox-func-ec-py37
- swift-probetests-centos-7: - swift-probetests-centos-7:

View File

@@ -16,6 +16,7 @@
from __future__ import print_function from __future__ import print_function
import mock import mock
import os import os
import six
from six.moves.urllib.parse import urlparse, urlsplit, urlunsplit from six.moves.urllib.parse import urlparse, urlsplit, urlunsplit
import sys import sys
import pickle import pickle
@@ -25,6 +26,7 @@ import eventlet
import eventlet.debug import eventlet.debug
import functools import functools
import random import random
import base64
from time import time, sleep from time import time, sleep
from contextlib import closing from contextlib import closing
@@ -319,7 +321,9 @@ def _load_encryption(proxy_conf_file, swift_conf_file, **kwargs):
"proxy-logging proxy-server", "proxy-logging proxy-server",
"keymaster encryption proxy-logging proxy-server") "keymaster encryption proxy-logging proxy-server")
conf.set(section, 'pipeline', pipeline) conf.set(section, 'pipeline', pipeline)
root_secret = os.urandom(32).encode("base64") root_secret = base64.b64encode(os.urandom(32))
if not six.PY2:
root_secret = root_secret.decode('ascii')
conf.set('filter:keymaster', 'encryption_root_secret', root_secret) conf.set('filter:keymaster', 'encryption_root_secret', root_secret)
except NoSectionError as err: except NoSectionError as err:
msg = 'Error problem with proxy conf file %s: %s' % \ msg = 'Error problem with proxy conf file %s: %s' % \

View File

@@ -61,6 +61,12 @@ commands = {[testenv:func-py3]commands}
setenv = SWIFT_TEST_IN_PROCESS=1 setenv = SWIFT_TEST_IN_PROCESS=1
SWIFT_TEST_IN_PROCESS_CONF_LOADER=ec SWIFT_TEST_IN_PROCESS_CONF_LOADER=ec
[testenv:func-encryption-py3]
basepython = python3
commands = {[testenv:func-py3]commands}
setenv = SWIFT_TEST_IN_PROCESS=1
SWIFT_TEST_IN_PROCESS_CONF_LOADER=encryption
[testenv:func-domain-remap-staticweb-py3] [testenv:func-domain-remap-staticweb-py3]
basepython = python3 basepython = python3
commands = {[testenv:func-py3]commands} commands = {[testenv:func-py3]commands}