Create a 'ci' user to match upstream behaviour. This simulates cloud VM environments where ID 1000 is already taken. This ensures that test users start the ID assignment at 1001, making container tests consistent with cloud CI environments. Link: <https://github.com/shadow-maint/shadow/pull/1615> Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
66 lines
1.7 KiB
Plaintext
66 lines
1.7 KiB
Plaintext
/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
|
|
|
|
- name: Create CI user to simulate cloud VM environment
|
|
how: shell
|
|
script:
|
|
- podman exec builder useradd ci
|
|
|
|
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
|