Merge "py3: Add swift-tox-func-encryption-py37 gate job"
This commit is contained in:
commit
96ece6e18e
18
.zuul.yaml
18
.zuul.yaml
@ -96,6 +96,18 @@
|
||||
bindep_profile: test py37
|
||||
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:
|
||||
name: swift-tox-func-ec-py37
|
||||
parent: swift-tox-func-py37
|
||||
@ -453,6 +465,11 @@
|
||||
- ^(api-ref|doc|releasenotes)/.*$
|
||||
- ^test/probe/.*$
|
||||
- ^(.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:
|
||||
irrelevant-files:
|
||||
- ^(api-ref|doc|releasenotes)/.*$
|
||||
@ -535,6 +552,7 @@
|
||||
- swift-tox-func-ec
|
||||
- swift-tox-func-s3api
|
||||
- swift-tox-func-py37
|
||||
- swift-tox-func-encryption
|
||||
- swift-tox-func-domain-remap-staticweb-py37
|
||||
- swift-tox-func-ec-py37
|
||||
- swift-probetests-centos-7:
|
||||
|
@ -16,6 +16,7 @@
|
||||
from __future__ import print_function
|
||||
import mock
|
||||
import os
|
||||
import six
|
||||
from six.moves.urllib.parse import urlparse, urlsplit, urlunsplit
|
||||
import sys
|
||||
import pickle
|
||||
@ -25,6 +26,7 @@ import eventlet
|
||||
import eventlet.debug
|
||||
import functools
|
||||
import random
|
||||
import base64
|
||||
|
||||
from time import time, sleep
|
||||
from contextlib import closing
|
||||
@ -319,7 +321,9 @@ def _load_encryption(proxy_conf_file, swift_conf_file, **kwargs):
|
||||
"proxy-logging proxy-server",
|
||||
"keymaster encryption proxy-logging proxy-server")
|
||||
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)
|
||||
except NoSectionError as err:
|
||||
msg = 'Error problem with proxy conf file %s: %s' % \
|
||||
|
6
tox.ini
6
tox.ini
@ -62,6 +62,12 @@ commands = {[testenv:func-py3]commands}
|
||||
setenv = SWIFT_TEST_IN_PROCESS=1
|
||||
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]
|
||||
basepython = python3
|
||||
commands = {[testenv:func-py3]commands}
|
||||
|
Loading…
x
Reference in New Issue
Block a user