diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-03-21 15:57:40 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-04-05 16:59:16 +0200 |
commit | f9fe3ae5dd7ef03b97d7f1b3b4a6d5a92dccaef5 (patch) | |
tree | 0687d1197f8f826822bc8a0fd00dc019c287b161 /test/pasta_podman | |
parent | e8b78217bb1b13d145284e905be60274164b9dd0 (diff) | |
download | passt-f9fe3ae5dd7ef03b97d7f1b3b4a6d5a92dccaef5.tar passt-f9fe3ae5dd7ef03b97d7f1b3b4a6d5a92dccaef5.tar.gz passt-f9fe3ae5dd7ef03b97d7f1b3b4a6d5a92dccaef5.tar.bz2 passt-f9fe3ae5dd7ef03b97d7f1b3b4a6d5a92dccaef5.tar.lz passt-f9fe3ae5dd7ef03b97d7f1b3b4a6d5a92dccaef5.tar.xz passt-f9fe3ae5dd7ef03b97d7f1b3b4a6d5a92dccaef5.tar.zst passt-f9fe3ae5dd7ef03b97d7f1b3b4a6d5a92dccaef5.zip |
test: Build and download podman as a test asset
The pasta_podman/bats test scrpt downloads and builds podman, then runs its
pasta specific tests. Downloading from within a test case has some
drawbacks:
* It can be very tedious if you have poor connectivity to the server
* It makes a test that's ostensibly for pasta itself dependent on the
state of the github server
* It precludes runnning the tests in an isolated network environment
The same concerns largely apply to building podman too, because it's pretty
common for Go builds to download dependencies themselves. Therefore move
the download and build of podman from the test itself, to the Makefile
where we prepare other test assets.
To avoid cryptic failures if something went wrong with the build, make
running the test dependent on having the built podman binary.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/pasta_podman')
-rw-r--r-- | test/pasta_podman/bats | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/pasta_podman/bats b/test/pasta_podman/bats index 21446f0..cb88aa4 100644 --- a/test/pasta_podman/bats +++ b/test/pasta_podman/bats @@ -11,11 +11,9 @@ # Copyright (c) 2022 Red Hat GmbH # Author: Stefano Brivio <sbrivio@redhat.com> -htools git make go bats catatonit ip jq socat +htools git make go bats catatonit ip jq socat ./test/podman/bin/podman test Podman system test with bats -host git -C __STATEDIR__ clone https://github.com/containers/podman.git -host make -C __STATEDIR__/podman hout WD pwd -host PODMAN="__STATEDIR__/podman/bin/podman" CONTAINERS_HELPER_BINARY_DIR="__WD__" bats __STATEDIR__/podman/test/system/505-networking-pasta.bats +host PODMAN="test/podman/bin/podman" CONTAINERS_HELPER_BINARY_DIR="__WD__" bats test/podman/test/system/505-networking-pasta.bats |