CI: Move a bunch of func test jobs from py38 to py312

Change-Id: I8c65c7829fbe167e0c79239d577c38e90b93b5cf
This commit is contained in:
Tim Burke 2024-10-24 13:31:23 -07:00
parent 288677695d
commit c3f1ed3df1
3 changed files with 37 additions and 32 deletions

View File

@ -173,23 +173,23 @@
python_version: 2.7
- job:
name: swift-tox-func-py38
name: swift-tox-func-py312
parent: swift-tox-base
nodeset: ubuntu-focal
nodeset: ubuntu-noble
description: |
Run functional tests for swift under cPython version 3.8.
Run functional tests for swift under cPython version 3.12.
Uses tox with the ``func-py3`` environment.
It sets TMPDIR to an XFS mount point created via
tools/test-setup.sh.
vars:
tox_envlist: func-py3
bindep_profile: test py38
python_version: 3.8
bindep_profile: test py312
python_version: 3.12
- job:
name: swift-tox-func-py39-centos-9-stream
parent: swift-tox-func-py38
parent: swift-tox-func-py312
nodeset: centos-9-stream
vars:
bindep_profile: test py39
@ -208,10 +208,10 @@
tox_envlist: func-ec-py3
- job:
name: swift-tox-func-encryption-py38
parent: swift-tox-func-py38
name: swift-tox-func-encryption-py312
parent: swift-tox-func-py312
description: |
Run functional tests for swift under cPython version 3.8.
Run functional tests for swift under cPython version 3.12.
Uses tox with the ``func-encryption-py3`` environment.
It sets TMPDIR to an XFS mount point created via
@ -220,11 +220,11 @@
tox_envlist: func-encryption-py3
- job:
name: swift-tox-func-encryption-py38-arm64
parent: swift-tox-func-encryption-py38
nodeset: ubuntu-focal-arm64
name: swift-tox-func-encryption-py312-arm64
parent: swift-tox-func-encryption-py312
nodeset: ubuntu-noble-arm64
description: |
Run functional tests for swift under cPython version 3.8
Run functional tests for swift under cPython version 3.12
on top of arm64 architecture.
Uses tox with the ``func-encryption-py3`` environment.
@ -233,11 +233,11 @@
timeout: 10800
- job:
name: swift-tox-func-py38-arm64
parent: swift-tox-func-py38
nodeset: ubuntu-focal-arm64
name: swift-tox-func-py312-arm64
parent: swift-tox-func-py312
nodeset: ubuntu-noble-arm64
description: |
Run functional tests for swift under cPython version 3.8
Run functional tests for swift under cPython version 3.12
on top of arm64 architecture.
Uses tox with the ``func-py3`` environment.
@ -246,10 +246,10 @@
timeout: 10800
- job:
name: swift-tox-func-ec-py38
parent: swift-tox-func-py38
name: swift-tox-func-ec-py312
parent: swift-tox-func-py312
description: |
Run functional tests for swift under cPython version 3.8.
Run functional tests for swift under cPython version 3.12.
Uses tox with the ``func-ec-py3`` environment.
It sets TMPDIR to an XFS mount point created via
@ -616,8 +616,8 @@
experimental:
jobs:
- swift-tox-py38-arm64
- swift-tox-func-encryption-py38-arm64
- swift-tox-func-py38-arm64
- swift-tox-func-encryption-py312-arm64
- swift-tox-func-py312-arm64
- project:
templates:
@ -668,11 +668,11 @@
irrelevant-files: *functest-irrelevant-files
# py3 functional tests
- swift-tox-func-py38:
- swift-tox-func-py312:
irrelevant-files: *functest-irrelevant-files
- swift-tox-func-encryption-py38:
- swift-tox-func-encryption-py312:
irrelevant-files: *functest-irrelevant-files
- swift-tox-func-ec-py38:
- swift-tox-func-ec-py312:
irrelevant-files: *functest-irrelevant-files
# Other tests
@ -749,9 +749,9 @@
- swift-tox-func-py27
- swift-tox-func-encryption-py27
- swift-tox-func-ec-py27
- swift-tox-func-py38
- swift-tox-func-encryption-py38
- swift-tox-func-ec-py38
- swift-tox-func-py312
- swift-tox-func-encryption-py312
- swift-tox-func-ec-py312
- swift-func-cors
- swift-tox-func-s3api-tests-tempauth
- swift-probetests-centos-9-stream:

View File

@ -15,6 +15,7 @@
# limitations under the License.
import requests
import six
import botocore
@ -56,11 +57,18 @@ class TestS3ApiXxeInjection(S3ApiBaseBoto3):
# https://github.com/boto/boto3/issues/2192
self.conn.meta.events.register(
'before-sign.s3.*', self._clear_data)
return self.conn.generate_presigned_url(
url = self.conn.generate_presigned_url(
method, Params=params, ExpiresIn=60)
finally:
self.conn.meta.events.unregister(
'before-sign.s3.*', self._clear_data)
if not params.get('Key') and '/?' not in url and not six.PY2:
# Some combination of dependencies seems to cause bucket requests
# to not get the trailing slash despite signing with it? But only
# new-enough versions sign with the trailing slash; py2 is stuck
# with old.
url = url.replace('?', '/?')
return url
def test_put_bucket_acl(self):
if not tf.cluster_info['s3api'].get('s3_acl'):

View File

@ -68,14 +68,12 @@ commands =
[testenv:func-py3]
basepython = python3
deps = {[testenv:py36]deps}
allowlist_externals =
./.functests
commands = ./.functests {posargs}
[testenv:func-ec-py3]
basepython = python3
deps = {[testenv:py36]deps}
allowlist_externals =
./.functests
commands = ./.functests {posargs}
@ -84,7 +82,6 @@ setenv = SWIFT_TEST_IN_PROCESS=1
[testenv:func-encryption-py3]
basepython = python3
deps = {[testenv:py36]deps}
allowlist_externals =
./.functests
commands = ./.functests {posargs}