From b329230fd2da65538e596ee95f4e52e857e7ef0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zachar?= Date: Fri, 3 Jul 2026 09:53:25 +0200 Subject: [PATCH] Use 'osci' for gating Use same plan/test as c9s --- ci.fmf | 7 ------- gating.yaml | 2 +- integration.fmf | 14 ++++++++++++++ tests/example/pip-tools.fmf | 2 ++ tests/example/pipfile.fmf | 2 ++ tests/example/poetry.fmf | 2 ++ tests/example/requirements.fmf | 2 ++ tests/example/test_install.sh | 11 +++++++++++ tests/smoke.fmf | 2 ++ tests/smoke.sh | 12 ++++++++++++ 10 files changed, 48 insertions(+), 8 deletions(-) delete mode 100644 ci.fmf create mode 100644 integration.fmf create mode 100644 tests/example/pip-tools.fmf create mode 100644 tests/example/pipfile.fmf create mode 100644 tests/example/poetry.fmf create mode 100644 tests/example/requirements.fmf create mode 100755 tests/example/test_install.sh create mode 100644 tests/smoke.fmf create mode 100644 tests/smoke.sh diff --git a/ci.fmf b/ci.fmf deleted file mode 100644 index bb4ed67..0000000 --- a/ci.fmf +++ /dev/null @@ -1,7 +0,0 @@ -summary: Tier tests -discover: - how: fmf - repository: git://pkgs.devel.redhat.com/tests/micropipenv - filter: 'tier:1' -execute: - how: tmt diff --git a/gating.yaml b/gating.yaml index 1b98755..6985029 100644 --- a/gating.yaml +++ b/gating.yaml @@ -3,4 +3,4 @@ product_versions: - rhel-8 decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.other.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/integration.fmf b/integration.fmf new file mode 100644 index 0000000..b09e86c --- /dev/null +++ b/integration.fmf @@ -0,0 +1,14 @@ +summary: Integration tests for micropipenv +discover: + how: fmf +execute: + how: tmt +prepare: + - name: install git-core + how: install + package: + - git-core + - micropipenv + - name: clone upstream test data + how: shell + script: git clone https://github.com/thoth-station/micropipenv.git /tmp/micropipenv diff --git a/tests/example/pip-tools.fmf b/tests/example/pip-tools.fmf new file mode 100644 index 0000000..e761897 --- /dev/null +++ b/tests/example/pip-tools.fmf @@ -0,0 +1,2 @@ +summary: Install from pip-tools +test: ./test_install.sh pip-tools diff --git a/tests/example/pipfile.fmf b/tests/example/pipfile.fmf new file mode 100644 index 0000000..556a0f1 --- /dev/null +++ b/tests/example/pipfile.fmf @@ -0,0 +1,2 @@ +summary: Install from Pipfile +test: ./test_install.sh pipenv diff --git a/tests/example/poetry.fmf b/tests/example/poetry.fmf new file mode 100644 index 0000000..03226a0 --- /dev/null +++ b/tests/example/poetry.fmf @@ -0,0 +1,2 @@ +summary: Install from poetry +test: ./test_install.sh poetry diff --git a/tests/example/requirements.fmf b/tests/example/requirements.fmf new file mode 100644 index 0000000..c20d890 --- /dev/null +++ b/tests/example/requirements.fmf @@ -0,0 +1,2 @@ +summary: Install from requirements +test: ./test_install.sh requirements diff --git a/tests/example/test_install.sh b/tests/example/test_install.sh new file mode 100755 index 0000000..4555c54 --- /dev/null +++ b/tests/example/test_install.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e +pushd /tmp/micropipenv/tests/data/install/"$1"/ +python3 -m venv venv +source venv/bin/activate +micropipenv install +pip3 list +deactivate +rm -rf venv +popd diff --git a/tests/smoke.fmf b/tests/smoke.fmf new file mode 100644 index 0000000..25498bb --- /dev/null +++ b/tests/smoke.fmf @@ -0,0 +1,2 @@ +test: bash ./smoke.sh +framework: shell diff --git a/tests/smoke.sh b/tests/smoke.sh new file mode 100644 index 0000000..fee1bf2 --- /dev/null +++ b/tests/smoke.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -ex + +username="test_$$" +id "$username" && userdel -rf "$username" + +useradd "$username" +su -l -c "echo simple-manylinux-demo > requirements.txt" "$username" +su -l -c "micropipenv install -- --user" "$username" +su -l -c "python3 -c 'from dummyextension.extension import hello; assert hello() == \"Hello from Python extension!\"'" "$username" + +userdel -rf "$username"