Skip to content

Commit

Permalink
py3: Add swift-tox-func-encryption-py37 gate job
Browse files Browse the repository at this point in the history
Change-Id: Ia9ae0fc226dfc9b40157faebac100c10a9180c62
  • Loading branch information
tipabu committed Aug 6, 2019
1 parent ab19241 commit 2c727f6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -454,6 +466,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)/.*$
Expand Down Expand Up @@ -536,6 +553,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:
Expand Down
6 changes: 5 additions & 1 deletion test/functional/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -25,6 +26,7 @@
import eventlet.debug
import functools
import random
import base64

from time import time, sleep
from contextlib import closing
Expand Down Expand Up @@ -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' % \
Expand Down
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,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}
Expand Down

0 comments on commit 2c727f6

Please sign in to comment.