Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d3ffa0bf0 |
3 changed files with 66 additions and 0 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
64
main.fmf
Normal file
64
main.fmf
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/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: shell
|
||||
script:
|
||||
- dnf install -y python3-pip git podman hostname
|
||||
- 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: Install base packages in builder container
|
||||
how: shell
|
||||
script:
|
||||
- podman exec builder dnf install -y python3-pip git hostname
|
||||
- podman exec builder pip3 install --upgrade pip
|
||||
|
||||
- name: Create directory structure in builder container
|
||||
how: shell
|
||||
script:
|
||||
- podman exec builder mkdir -p /shadow/tests/system
|
||||
|
||||
- name: Copy entire shadow repository to builder container
|
||||
how: shell
|
||||
script:
|
||||
- podman cp /shadow/. builder:/shadow/
|
||||
|
||||
- name: Install Python dependencies in builder container
|
||||
how: shell
|
||||
script:
|
||||
- podman exec builder pip3 install -r /shadow/tests/system/requirements.txt
|
||||
|
||||
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
|
||||
duration: 30m
|
||||
|
|
@ -11,3 +11,4 @@
|
|||
required_packages:
|
||||
- shadow-utils # sanity test needs shadow-utils
|
||||
- python # sanity test needs python
|
||||
- util-linux
|
||||
|
|
|
|||
Loading…
Reference in a new issue