1
0
mirror of https://passt.top/passt synced 2024-09-28 10:05:47 +00:00

test: Add Podman system test with bats for pasta

Ugly as hell, but we keep breaking things otherwise, and I keep
forgetting to run this manually (as long as it's based on my local
Podman setup, that's the only alternative).

We need to clone the Podman repository as distribution packages don't
contain test scripts, typically. While at it, build the latest
version which is what really matters.

As we're planning anyway to revamp the test framework, I'd be
inclined to just add this without too many thoughts, and have it as
a nice-to-have requirement reminder for the new framework.

Link: https://github.com/containers/podman/pull/19699
Suggested-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Stefano Brivio 2023-08-23 15:51:49 +02:00
parent 1f24d3efb4
commit ee58f37db0
3 changed files with 27 additions and 2 deletions

View File

@ -28,8 +28,8 @@ on a system, i.e. common utilities such as a shell are not included here.
Example for Debian, and possibly most Debian-based distributions: Example for Debian, and possibly most Debian-based distributions:
build-essential git jq strace iperf3 qemu-system-x86 tmux sipcalc bc build-essential git jq strace iperf3 qemu-system-x86 tmux sipcalc bats bc
clang-tidy cppcheck isc-dhcp-common psmisc linux-cpupower socat catatonit clang-tidy cppcheck go isc-dhcp-common psmisc linux-cpupower socat
netcat-openbsd fakeroot lz4 lm-sensors qemu-system-arm qemu-system-ppc netcat-openbsd fakeroot lz4 lm-sensors qemu-system-arm qemu-system-ppc
qemu-system-misc qemu-system-x86 valgrind qemu-system-misc qemu-system-x86 valgrind

21
test/pasta_podman/bats Normal file
View File

@ -0,0 +1,21 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# PASST - Plug A Simple Socket Transport
# for qemu/UNIX domain socket mode
#
# PASTA - Pack A Subtle Tap Abstraction
# for network namespace/tap device mode
#
# test/pasta_podman/bats - Build Podman, run pasta system test with bats
#
# Copyright (c) 2022 Red Hat GmbH
# Author: Stefano Brivio <sbrivio@redhat.com>
htools git make go bats catatonit ip jq socat
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

View File

@ -82,6 +82,10 @@ run() {
test pasta_options/log_to_file test pasta_options/log_to_file
teardown pasta_options teardown pasta_options
setup build
test pasta_podman/bats
teardown build
setup memory setup memory
test memory/passt test memory/passt
teardown memory teardown memory