#18 run tests using standard-test-basic role
Merged 2 months ago by santiago. Opened 2 months ago by bgoncalv.
rpms/ bgoncalv/podman fix-test  into  master

file modified
+3 -7

@@ -1,13 +1,9 @@ 

- #!/bin/bash

+ #!/bin/bash -e

  #

  # Simple podman tests

  #

  

- rm -f /tmp/test.log /tmp/test.debug.log

- 

  # Log program versions

- rpm -q podman podman-tests >/tmp/test.debug.log

- 

- bats /usr/share/podman/test/system &> /tmp/test.log

+ rpm -q podman podman-tests

  

- echo "bats completed with status $?" >>/tmp/test.debug.log

+ bats /usr/share/podman/test/system

file modified
+18 -33

@@ -1,35 +1,20 @@ 

  ---

  - hosts: localhost

-   vars:

-   - artifacts: ./artifacts

-   # FIXME! It would be cleaner to include 'podman' in this list; but the

-   # dnf module is broken in ansible <= 2.8, it doesn't report failures

-   # to install as long as _one_ package installs! So if podman installs

-   # but podman-tests doesn't, the `dnf` stanza succeeds, then the test

-   # one fails with a less-than-helpful error.

-   #

-   # See https://github.com/ansible/ansible/pull/49760

-   - required_packages:

-       - podman-tests

-   tags:

-     - classic

-     - container

- 

-   tasks:

-   - name: install packages

-     dnf: name="{{ required_packages }}" state=installed

-         enablerepo=updates-testing

- 

-   - block:

-       # FIXME: how to make two passes, one as root and one rootless?

-       - name: Run test

-         script: ./test_podman.sh

-     always:

-       - name: Pull out logs

-         fetch:

-           src: "/tmp/{{ item }}"

-           dest: "{{ artifacts }}/{{ item }}"

-           flat: yes

-         with_items:

-           - test.log

-           - test.debug.log

+   roles:

+     - role: standard-test-basic

+       tags:

+         - classic

+         - container

+       required_packages:

+         - bats

+         - podman

+         - podman-tests

+       tests:

+         - root-test:

+             dir: ./

+             run: ./test_podman.sh

+         - rootless-test:

+             # running the test with su doesn't create the directory for fedora user on /run/user/

+             # so create it manually

+             dir: ./

+             run: mkdir /run/user/$(id -u fedora); su -c ${PWD}/test_podman.sh - fedora

Is there no need for a chown?

attempt to run the test also as rootless

rebased onto 47a5a6b

2 months ago

Sigh. My tests got completely deleted by f9aac43, probably inadvertently. I will try to reinstate them next week.

rebased onto 18ff740

2 months ago

Note this PR is for master, at least on master the tests are still there: https://src.fedoraproject.org/rpms/podman/blob/master/f/tests

Is there no need for a chown?

Thank you for these changes. It looks like things have changed significantly since the last time I looked. Where is all this documented? Is there a mailing list I should subscribe to?

PS once the PSI outage is resolved, is this something I can test with 1minutetip?

Thanks again!

Thank you for these changes. It looks like things have changed significantly since the last time I looked. Where is all this documented? Is there a mailing list I should subscribe to?
PS once the PSI outage is resolved, is this something I can test with 1minutetip?
I think if you can run this test with 1minutetip by doing the steps below, just make sure to have latest standard-test-roles module installed.

apply the patch of this PR
cd tests
1minutetip Fedora

Thanks again!

LGTM. Could you please merge? (I see no way for me to do so). Then I will import into f30 branch. Thank you!

rebased onto 096afbc

2 months ago

@santiago only members on this podman project can merge this PR.

Pull-Request has been merged by santiago

2 months ago