From a9c51764dd20cfc3025ac116290c1c484fe97e62 Mon Sep 17 00:00:00 2001 From: Lukas Zachar Date: Tue, 16 Jan 2024 12:04:07 +0100 Subject: [PATCH] Add tmt plan for gating Cherry-picked from python3.11-urllib3 095ef781f440c73487a2b96d150ca18e7346d2ce https://gitlab.com/redhat/centos-stream/rpms/python3.11-urllib3/-/commit/095ef781f440c73487a2b96d150ca18e7346d2ce --- .fmf/version | 1 + gating.yaml | 7 +++++++ plan.fmf | 23 +++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 plan.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..a77f895 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy + +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/plan.fmf b/plan.fmf new file mode 100644 index 0000000..c55bfe0 --- /dev/null +++ b/plan.fmf @@ -0,0 +1,23 @@ +execute: + how: tmt +discover: + how: shell + dist-git-source: true + tests: + - name: bundled tests + require: + - python3.12-pytest + - python3.12-pip + - python3.12-cryptography + - python3.12-pycparser + - python3.12-cffi + - python3.12-urllib3 + test: | + pip3.12 install trustme==0.9.0 tornado==6.2 pytest-freezegun==0.4.2 && + cd $(dirname $TMT_SOURCE_DIR/urllib3-*/test) && + rm -rf test/appengine test/test_no_ssl.py && + rm -rf test/with_dummyserver test/contrib && + sed -i -e 's/^import mock/from unittest import mock/' \ + -e 's/^from mock import /from unittest.mock import /' \ + test/*.py docs/conf.py && + pytest-3.12 test