From 7e2553d035324c8d81ef1dbdbdc6076ea8bdbb5f Mon Sep 17 00:00:00 2001 From: aborah-sudo Date: Fri, 20 Mar 2026 16:59:21 +0530 Subject: [PATCH] Point the new tests and replace the old ones Replace https://github.com/aborah-sudo/shadow-cs.git with https://github.com/shadow-maint/shadow --- .fmf/version | 1 + main.fmf | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .fmf/version create mode 100644 main.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/main.fmf b/main.fmf new file mode 100644 index 0000000..d9ca7de --- /dev/null +++ b/main.fmf @@ -0,0 +1,60 @@ +/plan: + summary: Run shadow tests with pytest-mh (builder container) + + provision: + how: container + image: quay.io/centos/centos:stream10 + + prepare: + - name: Install base dependencies + how: install + package: + - python3-pip + - git + - podman + - hostname + + - name: Upgrade pip + how: shell + script: + - pip3 install --upgrade pip + + - name: Clone shadow repository + how: shell + script: + - git clone https://github.com/shadow-maint/shadow.git /shadow + + - name: Install Python dependencies on host + how: shell + script: + - pip3 install -r /shadow/tests/system/requirements.txt + + - name: Start builder container + how: shell + script: + - podman rm -f builder || true + - podman run -d --name builder quay.io/centos/centos:stream10 sleep infinity + + - name: Update builder container + how: shell + script: + - podman exec builder dnf update -y + - podman exec builder dnf install -y util-linux expect + + discover: + how: fmf + + execute: + how: tmt + + +/test: + summary: Run system tests + test: | + cd /shadow/tests/system + + pytest --mh-config=mhc.yaml --mh-lazy-ssh -v \ + -k "not (test_chage and invalid_date) and \ + not (test_useradd and set_expire_date_with_invalid_date) and \ + not (test_usermod and set_expire_date_with_invalid_date)" + duration: 30m