Merge pull request #18163 from Luap99/ginkgo-v2

update to ginkgo v2
This commit is contained in:
OpenShift Merge Robot 2023-05-02 10:29:41 -04:00 committed by GitHub
commit f173db755d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
567 changed files with 39254 additions and 20546 deletions

View File

@ -574,7 +574,7 @@ local_integration_test_task: &local_integration_test_task
- unit_test
matrix: *platform_axis
gce_instance: *standardvm
timeout_in: 90m
timeout_in: 50m
env:
TEST_FLAVOR: int
clone_script: *get_gosrc
@ -620,7 +620,7 @@ container_integration_test_task:
CI_DESIRED_RUNTIME: crun
CI_DESIRED_NETWORK: cni
gce_instance: *standardvm
timeout_in: 90m
timeout_in: 50m
env:
TEST_FLAVOR: int
TEST_ENVIRON: container
@ -639,7 +639,7 @@ rootless_integration_test_task:
depends_on: *build_unit
matrix: *platform_axis
gce_instance: *standardvm
timeout_in: 90m
timeout_in: 50m
env:
TEST_FLAVOR: int
PRIV_NAME: rootless

View File

@ -126,8 +126,7 @@ LIBSECCOMP_COMMIT := v2.3.3
GINKGOTIMEOUT ?= -timeout=90m
# By default, run test/e2e
GINKGOWHAT ?= test/e2e/.
# By default, run tests in parallel across 3 nodes.
GINKGONODES ?= 3
GINKGO_PARALLEL=y
GINKGO ?= ./test/tools/build/ginkgo
# Conditional required to produce empty-output if binary not built yet.
@ -542,11 +541,11 @@ localunit: test/goecho/goecho test/version/version
UNIT=1 $(GINKGO) \
-r \
$(TESTFLAGS) \
--skipPackage test/e2e,pkg/apparmor,pkg/bindings,hack,pkg/machine/e2e \
--skip-package test/e2e,pkg/bindings,hack,pkg/machine/e2e \
--cover \
--covermode atomic \
--coverprofile coverprofile \
--outputdir ${COVERAGE_PATH} \
--output-dir ${COVERAGE_PATH} \
--tags "$(BUILDTAGS)" \
--succinct
$(GO) tool cover -html=${COVERAGE_PATH}/coverprofile -o ${COVERAGE_PATH}/coverage.html
@ -558,8 +557,8 @@ test: localunit localintegration remoteintegration localsystem remotesystem ##
.PHONY: ginkgo-run
ginkgo-run: .install.ginkgo
ACK_GINKGO_RC=true $(GINKGO) version
ACK_GINKGO_RC=true $(GINKGO) -v $(TESTFLAGS) -tags "$(TAGS) remote" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor -nodes $(GINKGONODES) -debug $(GINKGOWHAT) $(HACK)
$(GINKGO) version
$(GINKGO) -vv $(TESTFLAGS) --tags "$(TAGS) remote" $(GINKGOTIMEOUT) --flake-attempts 3 --trace --no-color $(if $(findstring y,$(GINKGO_PARALLEL)),-p,) $(GINKGOWHAT) $(HACK)
.PHONY: ginkgo
ginkgo:
@ -571,7 +570,7 @@ ginkgo-remote:
.PHONY: testbindings
testbindings: .install.ginkgo
ACK_GINKGO_RC=true $(GINKGO) -v $(TESTFLAGS) -tags "$(TAGS) remote" $(GINKGOTIMEOUT) -progress -trace -noColor -debug -timeout 30m -v -r ./pkg/bindings/test
$(GINKGO) -v $(TESTFLAGS) --tags "$(TAGS) remote" $(GINKGOTIMEOUT) --trace --no-color --timeout 30m -v -r ./pkg/bindings/test
.PHONY: localintegration
localintegration: test-binaries ginkgo
@ -581,15 +580,7 @@ remoteintegration: test-binaries ginkgo-remote
.PHONY: localmachine
localmachine: test-binaries .install.ginkgo
$(MAKE) ginkgo-run GINKGONODES=1 GINKGOWHAT=pkg/machine/e2e/. HACK=
.PHONY: localbenchmarks
localbenchmarks: install.tools test-binaries
PATH=$(PATH):$(shell pwd)/hack ACK_GINKGO_RC=true $(GINKGO) \
-focus "Podman Benchmark Suite" \
-tags "$(BUILDTAGS) benchmarks" -noColor \
-noisySkippings=false -noisyPendings=false \
test/e2e/.
$(MAKE) ginkgo-run GINKGO_PARALLEL=n GINKGOWHAT=pkg/machine/e2e/. HACK=
.PHONY: localsystem
localsystem:

View File

@ -335,37 +335,3 @@ remove_packaged_podman_files() {
# Be super extra sure and careful vs performant and completely safe
sync && echo 3 > /proc/sys/vm/drop_caches || true
}
# Execute make localbenchmarks in $CIRRUS_WORKING_DIR/data
# for preserving as a task artifact.
localbenchmarks() {
local datadir envnames envname
req_env_vars DISTRO_NV PODBIN_NAME PRIV_NAME TEST_ENVIRON TEST_FLAVOR
req_env_vars VM_IMAGE_NAME EC2_INST_TYPE
datadir=$CIRRUS_WORKING_DIR/data
mkdir -p $datadir
envnames=$(passthrough_envars | sort);
(
echo "# Env. var basis for benchmarks benchmarks."
for envname in $envnames; do
printf "$envname=%q\n" "${!envname}"
done
echo "# Machine details for data-comparison sake, not actual env. vars."
# Checked above in req_env_vars
# shellcheck disable=SC2154
echo "\
BENCH_ENV_VER=1
CPUTOTAL=$(grep -ce '^processor' /proc/cpuinfo)
INST_TYPE=$EC2_INST_TYPE
MEMTOTALKB=$(awk -F: '$1 == "MemTotal" { print $2 }' </proc/meminfo | sed -e "s/^ *//" | cut -d ' ' -f 1)
UNAME_R=$(uname -r)
UNAME_M=$(uname -m)
"
) > $datadir/benchmarks.env
make localbenchmarks | tee $datadir/benchmarks.raw
msg "Processing raw benchmarks output"
hack/parse-localbenchmarks < $datadir/benchmarks.raw | tee $datadir/benchmarks.csv
}

View File

@ -12,13 +12,14 @@ use utf8;
# Grumble. CI system doesn't have 'open'
binmode STDIN, ':utf8';
binmode STDOUT, ':utf8';
binmode STDERR, ':utf8';
use strict;
use warnings;
(our $ME = $0) =~ s|.*/||;
our $VERSION = '0.2';
our $VERSION = '0.3';
# Autoflush stdout
$| = 1;
@ -46,8 +47,12 @@ table.synopsis { border: none; border-collapse: collapse; margin-left: 2em; marg
.log-debug { color: #999; }
.log-info { color: #333; }
.log-warning { color: #f60; }
.log-error { color: #900; font-weight: bold; }
.log-skip { color: #F90; }
.log-error { background: #fee; color: #900; font-weight: bold; }
.error-retry { color: #c33; font-size: 125%; font-weight: bold; border-top: 1px solid #f00; }
.log-passed { color: #393; }
.log-failed { color: #F00; font-weight: bold; font-size: 150%; }
.log-skipped { color: #F90; }
.log-flakey { background: #f93; font-weight: bold; font-size: 150%; }
.log-slow { background: #FF0; color: #000; font-weight: bold; }
.subtest { background: #eee; }
.subsubtest { color: #F39; font-weight: bold; }
@ -55,6 +60,22 @@ table.synopsis { border: none; border-collapse: collapse; margin-left: 2em; marg
.command { font-weight: bold; color: #000; }
.changed { color: #000; font-weight: bold; }
/* Ginkgo "Enter/Exit [foo]": visually separate from each other */
.ginkgo-timeline { margin-top: 1ex; margin-bottom: 1ex; }
/* BeforeEach and AfterEach tend to be boring. Gray them out. */
.ginkgo-beforeeach { background: #f0f0f0; color: #999; }
.ginkgo-aftereach { background: #f0f0f0; color: #999; }
.ginkgo-beforeeach b { color: #000; }
.ginkgo-aftereach b { color: #000; }
/* [It] is where the test happens but we don't need any special highlights */
.ginkgo-it { }
/* Finall summary line at bottom */
.ginkgo-final-success { background: #393; font-weight: bold; font-size: 150%; }
.ginkgo-final-fail { background: #f00; font-weight: bold; font-size: 150%; }
/* links to source files: not as prominent as links to errors */
a.codelink:link { color: #000; }
a.codelink:visited { color: #666; }
@ -67,6 +88,7 @@ a.timing { text-decoration: none; }
/* BATS styles */
.bats-passed { color: #393; }
.bats-failed { color: #F00; font-weight: bold; }
.bats-flaked { color: #F93; font-weight: bold; }
.bats-skipped { color: #F90; }
.bats-log { color: #933; }
.bats-log-failblock { color: #b00; background-color: #fee; display: inline-flex; margin: 0 -500%; padding: 0 500% !important; }
@ -74,7 +96,7 @@ a.timing { text-decoration: none; }
.bats-summary { font-size: 150%; }
/* error titles: display next to timestamp, not on separate line */
h2 { display: inline; }
h2,h3 { display: inline; }
END_CSS
# END user-customizable section
@ -210,9 +232,10 @@ END_HTML
my $previous_timestamp = ''; # timestamp of previous line
my $cirrus_task; # Cirrus task number, used for linking
my $git_commit; # git SHA, used for linking to source files
my $subtest_status; # pass, fail, skip, flake - for each subtest
my $in_failure; # binary flag: are we in an error dump?
my $in_timing; # binary flag: are we in the timing section?
my $after_divider = 0; # Count of lines after seeing '-----'
my $after_divider = 999; # Count of lines after seeing '-----'
my $current_output; # for removing duplication
my $looks_like_bats; # binary flag: for detecting BATS results
my $looks_like_python; # " " " : for colorizing python tests
@ -230,6 +253,12 @@ END_HTML
# Main loop: read input, one line at a time, and write out reformatted
LINE:
while (my $line = <STDIN>) {
# ARGH. Some log files have NUL characters , apparently because
# certain tests write tar to stdout. Bleagh. Although it seems
# rude to strip those from our (purportedly untouched) log,
# it's worse to read log files with random NULs.
$line =~ s/\0//g;
print $line; # Immediately dump back to stdout
$Prompt = '$' if $line =~ /Runner executing .* as rootless /;
@ -238,7 +267,6 @@ END_HTML
next LINE if ! $out_fh;
chomp $line;
$line =~ s/\0//g; # Some log files have NULs????
$line = escapeHTML($line);
# Temporarily strip off leading timestamp
@ -251,8 +279,8 @@ END_HTML
$previous_timestamp = $timestamp;
}
# Helper function for printing a formatted line. This should always
# be followed by 'next LINE'.
# Helper function for printing a formatted line. This should almost
# always be followed by 'next LINE'.
my $print_line = sub {
my $css = shift;
@ -264,6 +292,20 @@ END_HTML
print { $out_fh } "\n";
};
# ARGH! Special case for tests that run 'cat /proc/self/attr/current:
# that file terminates with NUL, so ginkgo logs concatenate the next
# output line, which is usually "Running: next-podman-command".
# This makes the log readable by splitting into two lines.
if ($line =~ /^(\s*)(\S+_u:\S+_t:\S+:c\S+)(Running:.*)/) {
my ($indent, $selinux, $nextline) = ($1||'', $2, $3);
# Print the SELinux line, unmodified...
$line = $indent . $selinux;
$print_line->();
# ...then forget that, and continue processing (fall through)
# with the 'Running' line.
$line = $indent . $nextline;
}
# Try to identify the git commit we're working with...
if ($line =~ m!/define.gitCommit=([0-9a-f]+)!) {
$git_commit = $1;
@ -384,18 +426,51 @@ END_HTML
next LINE;
}
#
# Must be ginkgo
#
if ($line =~ s!^(\s*)(&[gl]t;)\s+(Enter|Exit)\s+\[(\w+)\]!!) {
my ($indent, $arrow, $action, $block) = ($1, $2, $3, $4);
if ($action eq 'Enter') {
printf { $out_fh } "<div class=\"ginkgo-timeline ginkgo-%s\">",
lc($block);
$line = "$indent&rarr; Enter [<b>$block</b>]$line";
$print_line->();
}
else {
# Can be a div within a div
if ($in_failure) {
$in_failure = 0;
print { $out_fh } "</div>";
}
$line = "$indent&larr; Exit [$block]$line";
$print_line->();
print { $out_fh } "</div>";
}
next LINE;
}
# Ginkgo v2 nicely lumps all retries for the same given test
if ($line =~ /^\s*Attempt\s+\#\d+\s+Failed\.\s+Retr/) {
$print_line->("error-retry");
next LINE;
}
# Timing section at the bottom of the page
if ($line =~ / timing results\s*$/) {
$in_timing = 1;
}
elsif ($in_timing) {
if ($line =~ /^(\S.*\S)\s+(\d+\.\d+)\s*$/) {
if ($line =~ /^\s*(\S.*\S)\s+(\d+\.\d+)\s*$/) {
my ($name, $time) = ($1, $2);
my $id = make_id($1, 'timing');
# Try to column-align the timing numbers. Some test names
# will be longer than our max - oh well.
my $spaces = 80 - length(unescapeHTML($name));
my $spaces = 90 - length(unescapeHTML($name));
$spaces = 1 if $spaces < 1;
$spaces++ if $time < 10;
my $spacing = ' ' x $spaces;
@ -406,10 +481,38 @@ END_HTML
}
}
# Ginkgo summary line. Colorize Passed, Failed, Flaked, Skipped
if ($line =~ /^(\s*)(FAIL|SUCCESS)!(\s+--\s+)(.*\d+\sPassed.*)/) {
my ($indent, $status, $dashes, $rhs) = ($1, $2, $3, $4);
my @counts = split('\|', $rhs);
my @formatted;
for my $c (@counts) {
$c =~ /^(\s*)(\d+)\s+(\w+)(\s*)$/
or warn "$ME: line $.: WEIRD: '$c' in '$rhs' from '$line'";
my ($lhs, $n, $category, $rhs) = ($1||'', $2, $3, $4||'');
# Only highlight if count > 0, so "0 Failed" doesn't yell
if ($n > 0) {
# Yes, we use 'bats-xxxx' classes even though we're ginkgo.
push @formatted, sprintf("%s<span class=\"bats-%s\"><b>%d</b> %s</span>%s",
$lhs, lc($category), $n, $category, $rhs);
}
else {
# Zero. Leave unhighlighted.
push @formatted, $c;
}
}
$line = sprintf("%s<span class=\"ginkgo-final-%s\">%s!</span>%s%s",
$indent,
lc($status), $status,
$dashes, join('|', @formatted));
$print_line->();
next LINE;
}
#
# Ginkgo error reformatting
#
if ($line =~ /^.{1,4} (Failure|Panic)( in .*)? \[/) {
if ($line =~ /^\s*\[(FAILED|PANICKED)\]/) {
# Begins a block of multiple lines including a stack trace
print { $out_fh } "<div class='log-error'>\n";
$in_failure = 1;
@ -428,7 +531,7 @@ END_HTML
next LINE;
}
# (bindings test sometimes emits 'Running' with leading bullet char)
elsif ($line =~ s!^•?Running:!<span class="boring">$Prompt</span>!) {
elsif ($line =~ s!^•?(\s*)Running:!<span class="boring">$1$Prompt</span>!) {
# Highlight the important (non-boilerplate) podman command.
$line =~ s/\s+--remote\s+/ /g; # --remote takes no args
# Strip out the global podman options, but show them on hover
@ -449,15 +552,7 @@ END_HTML
$current_output = '';
}
# Grrr. 'output:' usually just tells us what we already know.
elsif ($line =~ /^output:/) {
$current_output =~ s!^\s+|\s+$!!g; # Trim leading/trailing blanks
$current_output =~ s/\s+/ /g; # Collapse multiple spaces
if ($line eq "output: $current_output" || $line eq 'output: ') {
next LINE;
}
}
elsif ($line =~ /^Error:/ || $line =~ / level=(warning|error) /) {
elsif ($line =~ /^\s*Error:/ || $line =~ / level=(warning|error) /) {
$line = "<span class='log-warning'>" . $line . "</span>";
}
elsif ($line =~ /^panic:/) {
@ -467,23 +562,91 @@ END_HTML
$current_output .= ' ' . $line;
}
#######################################################################
# DANGER DANGER DANGER! This is hideous and probably fragile.
#
# The way ginkgo shows tests is:
#
# -------------
# 1 [+NNNNs] * Status [x.y seconds]
# 2 Podman test module name
# 3 /var/tmp/..../something_test.go:linenumber
# 4 podman actual test name
#
# That is: one line after each divider, there's a status/timing line,
# then the Describe() string from a foo_test.go file with the next
# line being the file and line number; then the fourth line after
# divider is the actual subtest name, the It() string. USUALLY: ginkgo
# also spits out dash lines for other purposes. More on that below.
#
# When we link to a test result (in-page anchor) we use line 4,
# the subtest name. It's easy to link to that line (4), but it's
# way more useful to link to the status line (1): that way the
# user can see status, start time, run time, module name, all
# without having to scroll up.
#
# To do that, we need to read ahead in our input stream. For now I
# choose to use tell(), read, then seek() back. If that doesn't work
# I'll have to look into a rolling input buffer. Either way, yuk.
#######################################################################
if ($after_divider == 1) {
# Line 1: status and timing results
$line =~ s{(\[(\d+)\.\d+\s+seconds\])}{
if ($2 > 5) { "<b><span class='log-slow'>$1</span></b>" }
else { "<b>$1</b>" }
}e;
# Two lines after each divider, there's a test name. Make it
# an anchor so we can link to it later.
if ($after_divider++ == 2) {
# Sigh. There is no actual marker. Assume that anything with
## two leading spaces then alpha or hyphen (not slashes) is
## a test name.
if ($line =~ /^ [a-zA-Z-]/) {
my $id = make_id($line, 'anchor');
$line = "<a name='t--$id'><h2>$line</h2></a>";
# Make FAILED and SKIPPING visible
$subtest_status = 'passed';
if ($line =~ s!^(.*\[(SKIPPED|FAILED|FLAKEY).*\].*)!<span class="log-\L$2\E">$1</span>!) {
$subtest_status = lc($2);
}
# Read ahead. Here's where it gets ugly.
my $stream_pos = tell STDIN;
# As mentioned above, ginkgo can spit out lots of other things
# after a row of dashes. Check for those, and exclude them.
chomp(my $l2 = <STDIN>);
if ($l2 && $l2 !~ /(\[.*Suite\]|Summarizing|Runner executing|Ran \d+ of \d+ Specs)/) {
# Don't really care about line 3, only that it has slashes
chomp(my $l3 = <STDIN>);
if ($l3 && $l3 =~ m!/.*/!) {
# Line 4 should be a test name, indented, possibly with [It]
chomp(my $l4 = <STDIN>);
if ($l4 =~ /^\[\+\d+s\] *(\[It\]\s*)?([a-zA-Z-].*\S)/) {
# Yes! From the subtest name, make a page anchor,
# and link to our **CURRENT LINE**, the status one.
my $id = make_id(escapeHTML($2), 'anchor');
$line = "<a name='t--$id'><h2 class=\"log-$subtest_status\">$line</h2></a>";
}
else {
# Line 4 does not look like a test name.
# This warning will only likely be seen by Ed.
warn "$ME: line $.: unexpected line three down from dashes:\n";
warn " $line\n $l2\n $l3\n $l4\n";
}
}
}
else {
# Line 2 is one of the other non-test-result things that
# ginkgo emits after a row of dashes. Set this so our
# test name highlighter (below) does not false-trigger.
$after_divider = 999;
}
# Reset back to where we were in the input stream, and continue.
seek STDIN, $stream_pos, 0;
# FIXME: gray out entire block if it's skipped?
}
# Make SKIPPING and SLOW TEST visible
$line =~ s!(\[SKIPPING\].*)!<span class="log-skip">$1</span>!;
$line =~ s!(\[SLOW TEST.*\])!<span class="log-slow">$1</span>!;
# Two and four lines after each divider, there's a test module
# Description and a subtest name. Highlight both.
if ($after_divider == 2 || $after_divider == 4) {
my $level = 2 + ($after_divider == 4);
$line = "<h$level class=\"log-$subtest_status\">$line</h$level>";
}
++$after_divider;
# Highlight test name when it appears in the middle of commands.
# But make it boring, because we already have the test name in large
@ -491,12 +654,12 @@ END_HTML
$line =~ s!^(\s*)(\[It\]\s+.*)!$1<span class="testname">$2</span>!;
# Failure name corresponds to a previously-seen block.
# 1 2 2 3 3 14 4
if ($line =~ /^(\[(Fail|Panic!)\] .* \[(It|BeforeEach)\] )([A-Za-z-].*)/) {
# 1 2 2 3 3 14 4
if ($line =~ /^(\s*\[(FAIL|PANIC!)\] .* \[(It|BeforeEach|AfterEach)\] )([A-Za-z-].*)/) {
my ($lhs, $type, $ginkgo_fluff, $testname) = ($1, $2, $3, $4);
my $id = make_id($testname, 'link');
$line = "<b>$lhs<a href='#t--$id'>$testname</a></b>";
$line = "<span class=\"log-error\">$lhs<a href='#t--$id'>$testname</a></span>";
}
print { $out_fh } "<span class=\"timestamp\">$timestamp</span>"
@ -603,6 +766,7 @@ sub make_id {
state %counter;
$name =~ s/^\s+|\s+$//g; # strip leading/trailing whitespace
$name =~ s/^\[It\]\s*//; # strip leading "[It] "
$name =~ s/\&#\d+;//g; # 'doesn&#39;t' -> 'doesnt'
$name =~ s/\&quot;/-/g; # '&quot;path&quot;' -> '-path-'
$name =~ s/[^a-zA-Z0-9_-]/-/g; # Convert non-alphanumeric to dash

View File

@ -123,165 +123,122 @@ ok 4 blah
== simple ginkgo
<<<
$SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP}
[08:26:19] START - All [+xxxx] lines that follow are relative to right now.
[+0002s] GO111MODULE=on go build -mod=vendor -gcflags 'all=-trimpath=/var/tmp/go/src/github.com/containers/podman' -asmflags 'all=-trimpath=/var/tmp/go/src/github.com/containers/podman' -ldflags '-X github.com/containers/podman/libpod/define.gitCommit=40f5d8b1becd381c4e8283ed3940d09193e4fe06 -X github.com/containers/podman/libpod/define.buildInfo=1582809981 -X github.com/containers/podman/libpod/config._installPrefix=/usr/local -X github.com/containers/podman/libpod/config._etcDir=/etc -extldflags ""' -tags " selinux systemd exclude_graphdriver_devicemapper seccomp varlink" -o bin/podman github.com/containers/podman/cmd/podman
[+0103s]
[+0103s] ------------------------------
[+0103s] Podman pod restart
[+0103s] podman pod restart single empty pod
[+0103s] /var/tmp/go/src/github.com/containers/podman/test/e2e/pod_restart_test.go:41
[+0103s] [BeforeEach] Podman pod restart
[+0103s] /var/tmp/go/src/github.com/containers/podman/test/e2e/pod_restart_test.go:18
[+0103s] [It] podman pod restart single empty pod
[+0103s] /var/tmp/go/src/github.com/containers/podman/test/e2e/pod_restart_test.go:41
[+0103s] Running: /var/tmp/go/src/github.com/containers/podman/bin/quadlet -no-kmsg-log /tmp/podman_test620310100/generated with QUADLET_UNIT_DIRS=/tmp/podman_test620310100/quadlet
[+0103s] quadlet-generator[98757]: Error converting 'range.less-subnet.network', ignoring: cannot set more ranges than subnets
[+0103s] Running: /var/tmp/go/src/github.com/containers/podman/bin/podman --network-backend netavark --storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc --conmon /usr/bin/conmon --network-config-dir /etc/cni/net.d --cgroup-manager systemd --tmpdir /tmp/podman_test553496330 --events-backend file --storage-driver vfs pod create --infra=false --share
[+0103s] 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89
[+0103s] output: 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89
[+0103s] Running: /var/tmp/go/src/github.com/containers/podman/bin/podman --storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc --conmon /usr/bin/conmon --network-config-dir /etc/cni/net.d --cgroup-manager systemd --tmpdir /tmp/podman_test553496330 --events-backend file --storage-driver vfs pod restart 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89
[+0103s] Error: no containers in pod 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 have no dependencies, cannot start pod: no such container
[+0103s] output:
[+0103s] [AfterEach] Podman pod restart
[+0103s] /var/tmp/go/src/github.com/containers/podman/test/e2e/pod_restart_test.go:28
[+0103s] Running: /var/tmp/go/src/github.com/containers/podman/bin/podman --storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc --conmon /usr/bin/conmon --network-config-dir /etc/cni/net.d --cgroup-manager systemd --tmpdir /tmp/podman_test553496330 --events-backend file --storage-driver vfs pod rm -fa
[+0103s] 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89
[+0104s] Running: /var/tmp/go/src/github.com/containers/libpod/bin/podman-remote --storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc --conmon /usr/bin/conmon --network-config-dir /etc/cni/net.d --cgroup-manager systemd --tmpdir /tmp/podman_test553496330 --events-backend file --storage-driver vfs --remote --url unix:/run/user/12345/podman-xyz.sock pod rm -fa
[+0104s] 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 again
[+0107s]
[+0523s] ------------------------------
[+0523s] Podman play kube with build
[+0523s] --build should override image in store
[+0523s] /var/tmp/go/src/github.com/containers/podman/test/e2e/play_build_test.go:215
[+0479s]
[+0479s] ------------------------------
[+0479s] Podman pod rm
[+0479s] podman pod rm -a doesn't remove a running container
[+0479s] /var/tmp/go/src/github.com/containers/podman/test/e2e/pod_rm_test.go:119
[+1405s]
[+1405s] ------------------------------
[+1405s] Podman run entrypoint
[+1405s] podman run entrypoint == [""]
[+1405s] /var/tmp/go/src/github.com/containers/podman/test/e2e/run_entrypoint_test.go:47
[+0184s] S [SKIPPING] [3.086 seconds]
[+1385s] S [SKIPPING] in Spec Setup (BeforeEach) [0.001 seconds]
[+1512s] Summarizing 6 Failures:
[+1512s]
[+1512s] [Fail] Podman play kube with build [It] --build should override image in store
[+1512s] /var/tmp/go/src/github.com/containers/podman/test/e2e/play_build_test.go:259
[05:47:08] START - All [+xxxx] lines that follow are relative to 2023-04-17T05:47:08.
[+0004s] CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags '-X github.com/containers/podman/v4/libpod/define.gitCommit=074143b0fac7af72cd92048d27931a92fe745084 -X github.com/containers/podman/v4/libpod/define.buildInfo=1681728432 -X github.com/containers/podman/v4/libpod/config._installPrefix=/usr/local -X github.com/containers/podman/v4/libpod/config._etcDir=/usr/local/etc -X github.com/containers/podman/v4/pkg/systemd/quadlet._binDir=/usr/local/bin -X github.com/containers/common/pkg/config.additionalHelperBinariesDir= ' -tags " selinux systemd exclude_graphdriver_devicemapper seccomp" -o test/checkseccomp/checkseccomp ./test/checkseccomp
[+0006s] CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags '-X github.com/containers/podman/v4/libpod/define.gitCommit=074143b0fac7af72cd92048d27931a92fe745084 -X github.com/containers/podman/v4/libpod/define.buildInfo=1681728434 -X github.com/containers/podman/v4/libpod/config._installPrefix=/usr/local -X github.com/containers/podman/v4/libpod/config._etcDir=/usr/local/etc -X github.com/containers/podman/v4/pkg/systemd/quadlet._binDir=/usr/local/bin -X github.com/containers/common/pkg/config.additionalHelperBinariesDir= ' -o test/goecho/goecho ./test/goecho
[+0006s] ./hack/install_catatonit.sh
[+0270s] ------------------------------
[+0271s] * [3.327 seconds]
[+0271s] Podman restart
[+0271s] /var/tmp/go/src/github.com/containers/podman/test/e2e/restart_test.go:14
[+0271s] podman restart non-stop container with short timeout
[+0271s] /var/tmp/go/src/github.com/containers/podman/test/e2e/restart_test.go:148
[+0271s]
[+0271s] Timeline >>
[+0271s] > Enter [BeforeEach] Podman restart - /var/tmp/go/src/github.com/containers/podman/test/e2e/restart_test.go:21 @ 04/17/23 10:00:28.653
[+0271s] < Exit [BeforeEach] Podman restart - /var/tmp/go/src/github.com/containers/podman/test/e2e/restart_test.go:21 @ 04/17/23 10:00:28.653 (0s)
[+0271s] > Enter [It] podman restart non-stop container with short timeout - /var/tmp/go/src/github.com/containers/podman/test/e2e/restart_test.go:148 @ 04/17/23 10:00:28.653
[+0271s] Running: /var/tmp/go/src/github.com/containers/podman/bin/podman --storage-opt vfs.imagestore=/tmp/imagecachedir --root /tmp/podman_test2968516396/root --runroot /tmp/podman_test2968516396/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /tmp/podman_test2968516396/root/etc/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman_test2968516396 --events-backend file --db-backend sqlite --storage-driver vfs run -d --name test1 --env STOPSIGNAL=SIGKILL quay.io/libpod/alpine:latest sleep 999
[+0271s] 7f5f8fb3d043984cdff65994d14c4fd157479d20e0a0fcf769c35b50e8975edc
[+0271s] Running: /var/tmp/go/src/github.com/containers/podman/bin/podman --storage-opt vfs.imagestore=/tmp/imagecachedir --root /tmp/podman_test2968516396/root --runroot /tmp/podman_test2968516396/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /tmp/podman_test2968516396/root/etc/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman_test2968516396 --events-backend file --db-backend sqlite --storage-driver vfs restart -t 2 test1
[+0271s] time="2023-04-17T10:00:31-05:00" level=warning msg="StopSignal SIGTERM failed to stop container test1 in 2 seconds, resorting to SIGKILL"
[+0271s] test1
[+0271s] < Exit [It] podman restart non-stop container with short timeout - /var/tmp/go/src/github.com/containers/podman/test/e2e/restart_test.go:148 @ 04/17/23 10:00:31.334 (2.681s)
[+0271s] > Enter [AfterEach] Podman restart - /var/tmp/go/src/github.com/containers/podman/test/e2e/restart_test.go:30 @ 04/17/23 10:00:31.334
[+0271s] Running: /var/tmp/go/src/github.com/containers/podman/bin/podman --storage-opt vfs.imagestore=/tmp/imagecachedir --root /tmp/podman_test2968516396/root --runroot /tmp/podman_test2968516396/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /tmp/podman_test2968516396/root/etc/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman_test2968516396 --events-backend file --db-backend sqlite --storage-driver vfs stop --all -t 0
[+0271s] 7f5f8fb3d043984cdff65994d14c4fd157479d20e0a0fcf769c35b50e8975edc
[+0271s] Running: /var/tmp/go/src/github.com/containers/podman/bin/podman --storage-opt vfs.imagestore=/tmp/imagecachedir --root /tmp/podman_test2968516396/root --runroot /tmp/podman_test2968516396/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /tmp/podman_test2968516396/root/etc/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman_test2968516396 --events-backend file --db-backend sqlite --storage-driver vfs pod rm -fa -t 0
[+0271s] Running: /var/tmp/go/src/github.com/containers/podman/bin/podman --storage-opt vfs.imagestore=/tmp/imagecachedir --root /tmp/podman_test2968516396/root --runroot /tmp/podman_test2968516396/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /tmp/podman_test2968516396/root/etc/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman_test2968516396 --events-backend file --db-backend sqlite --storage-driver vfs rm -fa -t 0
[+0271s] 7f5f8fb3d043984cdff65994d14c4fd157479d20e0a0fcf769c35b50e8975edc
[+0271s] < Exit [AfterEach] Podman restart - /var/tmp/go/src/github.com/containers/podman/test/e2e/restart_test.go:30 @ 04/17/23 10:00:31.979 (645ms)
[+0271s] << Timeline
>>>
$SCRIPT_BASE/integration_test.sh |&amp; ${TIMESTAMP}
[08:26:19] START - All [+xxxx] lines that follow are relative to right now.
<span class="timestamp">[+0002s] </span>GO111MODULE=on go build -mod=vendor -gcflags &#39;all=-trimpath=/var/tmp/go/src/github.com/containers/podman&#39; -asmflags &#39;all=-trimpath=/var/tmp/go/src/github.com/containers/podman&#39; -ldflags &#39;-X github.com/containers/podman/libpod/define.gitCommit=40f5d8b1becd381c4e8283ed3940d09193e4fe06 -X github.com/containers/podman/libpod/define.buildInfo=1582809981 -X github.com/containers/podman/libpod/config._installPrefix=/usr/local -X github.com/containers/podman/libpod/config._etcDir=/etc -extldflags &quot;&quot;&#39; -tags &quot; selinux systemd exclude_graphdriver_devicemapper seccomp varlink&quot; -o bin/podman github.com/containers/podman/cmd/podman
<span class="timestamp">[+0103s] </span>
[05:47:08] START - All [+xxxx] lines that follow are relative to 2023-04-17T05:47:08.
<span class="timestamp">[+0004s] </span>CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags &#39;-X github.com/containers/podman/v4/libpod/define.gitCommit=074143b0fac7af72cd92048d27931a92fe745084 -X github.com/containers/podman/v4/libpod/define.buildInfo=1681728432 -X github.com/containers/podman/v4/libpod/config._installPrefix=/usr/local -X github.com/containers/podman/v4/libpod/config._etcDir=/usr/local/etc -X github.com/containers/podman/v4/pkg/systemd/quadlet._binDir=/usr/local/bin -X github.com/containers/common/pkg/config.additionalHelperBinariesDir= &#39; -tags &quot; selinux systemd exclude_graphdriver_devicemapper seccomp&quot; -o test/checkseccomp/checkseccomp ./test/checkseccomp
<span class="timestamp">[+0006s] </span>CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags &#39;-X github.com/containers/podman/v4/libpod/define.gitCommit=074143b0fac7af72cd92048d27931a92fe745084 -X github.com/containers/podman/v4/libpod/define.buildInfo=1681728434 -X github.com/containers/podman/v4/libpod/config._installPrefix=/usr/local -X github.com/containers/podman/v4/libpod/config._etcDir=/usr/local/etc -X github.com/containers/podman/v4/pkg/systemd/quadlet._binDir=/usr/local/bin -X github.com/containers/common/pkg/config.additionalHelperBinariesDir= &#39; -o test/goecho/goecho ./test/goecho
<span class="timestamp"> </span>./hack/install_catatonit.sh
</pre>
<hr />
<pre>
<span class="timestamp">[+0103s] </span>Podman pod restart
<span class="timestamp"> </span><a name='t--podman-pod-restart-single-empty-pod--1'><h2> podman pod restart single empty pod</h2></a>
<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/pod_restart_test.go#L41'>/containers/podman/test/e2e/pod_restart_test.go:41</a>
<span class="timestamp"> </span>[BeforeEach] Podman pod restart
<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/pod_restart_test.go#L18'>/containers/podman/test/e2e/pod_restart_test.go:18</a>
<span class="timestamp"> </span><span class="testname">[It] podman pod restart single empty pod</span>
<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/pod_restart_test.go#L41'>/containers/podman/test/e2e/pod_restart_test.go:41</a>
<span class="timestamp"> </span><span class="boring">#</span> <span title="/var/tmp/go/src/github.com/containers/podman/bin/quadlet"><b>quadlet -no-kmsg-log /tmp/podman_test620310100/generated</b></span><span class="boring"> with QUADLET_UNIT_DIRS=</span><b>/tmp/podman_test620310100/quadlet</b>
<span class="timestamp"> </span>quadlet-generator[98757]: Error converting &#39;range.less-subnet.network&#39;, ignoring: cannot set more ranges than subnets
<span class="timestamp"> </span><span class="boring">#</span> <span title="/var/tmp/go/src/github.com/containers/podman/bin/podman"><b>podman</b></span> <span class="boring" title="--network-backend netavark
--storage-opt vfs.imagestore=/tmp/podman/imagecachedir
--root /tmp/podman_test553496330/crio
--runroot /tmp/podman_test553496330/crio-run
--runtime /usr/bin/runc
<span class="timestamp">[+0271s] </span><a name='t--podman-restart-non-stop-container-with-short-timeout--1'><h2 class="log-passed">* <b>[3.327 seconds]</b></h2></a>
<span class="timestamp"> </span><h2 class="log-passed">Podman restart</h2>
<span class="timestamp"> </span>/var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/074143b0fac7af72cd92048d27931a92fe745084/test/e2e/restart_test.go#L14'>/containers/podman/test/e2e/restart_test.go:14</a>
<span class="timestamp"> </span><h3 class="log-passed"> podman restart non-stop container with short timeout</h3>
<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/074143b0fac7af72cd92048d27931a92fe745084/test/e2e/restart_test.go#L148'>/containers/podman/test/e2e/restart_test.go:148</a>
[+0271s]
<span class="timestamp"> </span> Timeline &gt;&gt;
<div class="ginkgo-timeline ginkgo-beforeeach"><span class="timestamp"> </span> &rarr; Enter [<b>BeforeEach</b>] Podman restart - /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/074143b0fac7af72cd92048d27931a92fe745084/test/e2e/restart_test.go#L21'>/containers/podman/test/e2e/restart_test.go:21</a> @ 04/17/23 10:00:28.653
<span class="timestamp"> </span> &larr; Exit [BeforeEach] Podman restart - /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/074143b0fac7af72cd92048d27931a92fe745084/test/e2e/restart_test.go#L21'>/containers/podman/test/e2e/restart_test.go:21</a> @ 04/17/23 10:00:28.653 (0s)
</div><div class="ginkgo-timeline ginkgo-it"><span class="timestamp"> </span> &rarr; Enter [<b>It</b>] podman restart non-stop container with short timeout - /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/074143b0fac7af72cd92048d27931a92fe745084/test/e2e/restart_test.go#L148'>/containers/podman/test/e2e/restart_test.go:148</a> @ 04/17/23 10:00:28.653
<span class="timestamp"> </span><span class="boring"> #</span> <span title="/var/tmp/go/src/github.com/containers/podman/bin/podman"><b>podman</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/imagecachedir
--root /tmp/podman_test2968516396/root
--runroot /tmp/podman_test2968516396/runroot
--runtime crun
--conmon /usr/bin/conmon
--network-config-dir /etc/cni/net.d
--network-config-dir /tmp/podman_test2968516396/root/etc/networks
--network-backend netavark
--cgroup-manager systemd
--tmpdir /tmp/podman_test553496330
--tmpdir /tmp/podman_test2968516396
--events-backend file
--storage-driver vfs">[options]</span><b> pod create --infra=false --share</b>
<span class="timestamp"> </span>4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89
<span class="timestamp"> </span><span class="boring">#</span> <span title="/var/tmp/go/src/github.com/containers/podman/bin/podman"><b>podman</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/podman/imagecachedir
--root /tmp/podman_test553496330/crio
--runroot /tmp/podman_test553496330/crio-run
--runtime /usr/bin/runc
--db-backend sqlite
--storage-driver vfs">[options]</span><b> run -d --name test1 --env STOPSIGNAL=SIGKILL quay.io/libpod/alpine:latest sleep 999</b>
<span class="timestamp"> </span> 7f5f8fb3d043984cdff65994d14c4fd157479d20e0a0fcf769c35b50e8975edc
<span class="timestamp"> </span><span class="boring"> #</span> <span title="/var/tmp/go/src/github.com/containers/podman/bin/podman"><b>podman</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/imagecachedir
--root /tmp/podman_test2968516396/root
--runroot /tmp/podman_test2968516396/runroot
--runtime crun
--conmon /usr/bin/conmon
--network-config-dir /etc/cni/net.d
--network-config-dir /tmp/podman_test2968516396/root/etc/networks
--network-backend netavark
--cgroup-manager systemd
--tmpdir /tmp/podman_test553496330
--tmpdir /tmp/podman_test2968516396
--events-backend file
--storage-driver vfs">[options]</span><b> pod restart 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89</b>
<span class="timestamp"> </span><span class='log-warning'>Error: no containers in pod 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 have no dependencies, cannot start pod: no such container</span>
<span class="timestamp"> </span>output:
<span class="timestamp"> </span>[AfterEach] Podman pod restart
<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/pod_restart_test.go#L28'>/containers/podman/test/e2e/pod_restart_test.go:28</a>
<span class="timestamp"> </span><span class="boring">#</span> <span title="/var/tmp/go/src/github.com/containers/podman/bin/podman"><b>podman</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/podman/imagecachedir
--root /tmp/podman_test553496330/crio
--runroot /tmp/podman_test553496330/crio-run
--runtime /usr/bin/runc
--db-backend sqlite
--storage-driver vfs">[options]</span><b> restart -t 2 test1</b>
<span class="timestamp"> </span> time=<span class='log-warning'>&quot;2023-04-17T10:00:31-05:00&quot;</span> level=<span class='log-warning'>warning</span> msg=<span class='log-warning'>&quot;StopSignal SIGTERM failed to stop container test1 in 2 seconds, resorting to SIGKILL&quot;</span>
<span class="timestamp"> </span> test1
<span class="timestamp"> </span> &larr; Exit [It] podman restart non-stop container with short timeout - /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/074143b0fac7af72cd92048d27931a92fe745084/test/e2e/restart_test.go#L148'>/containers/podman/test/e2e/restart_test.go:148</a> @ 04/17/23 10:00:31.334 (2.681s)
</div><div class="ginkgo-timeline ginkgo-aftereach"><span class="timestamp"> </span> &rarr; Enter [<b>AfterEach</b>] Podman restart - /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/074143b0fac7af72cd92048d27931a92fe745084/test/e2e/restart_test.go#L30'>/containers/podman/test/e2e/restart_test.go:30</a> @ 04/17/23 10:00:31.334
<span class="timestamp"> </span><span class="boring"> #</span> <span title="/var/tmp/go/src/github.com/containers/podman/bin/podman"><b>podman</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/imagecachedir
--root /tmp/podman_test2968516396/root
--runroot /tmp/podman_test2968516396/runroot
--runtime crun
--conmon /usr/bin/conmon
--network-config-dir /etc/cni/net.d
--network-config-dir /tmp/podman_test2968516396/root/etc/networks
--network-backend netavark
--cgroup-manager systemd
--tmpdir /tmp/podman_test553496330
--tmpdir /tmp/podman_test2968516396
--events-backend file
--storage-driver vfs">[options]</span><b> pod rm -fa</b>
<span class="timestamp"> </span>4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89
<span class="timestamp">[+0104s] </span><span class="boring">#</span> <span title="/var/tmp/go/src/github.com/containers/libpod/bin/podman-remote"><b>podman-remote</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/podman/imagecachedir
--root /tmp/podman_test553496330/crio
--runroot /tmp/podman_test553496330/crio-run
--runtime /usr/bin/runc
--db-backend sqlite
--storage-driver vfs">[options]</span><b> stop --all -t 0</b>
<span class="timestamp"> </span> 7f5f8fb3d043984cdff65994d14c4fd157479d20e0a0fcf769c35b50e8975edc
<span class="timestamp"> </span><span class="boring"> #</span> <span title="/var/tmp/go/src/github.com/containers/podman/bin/podman"><b>podman</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/imagecachedir
--root /tmp/podman_test2968516396/root
--runroot /tmp/podman_test2968516396/runroot
--runtime crun
--conmon /usr/bin/conmon
--network-config-dir /etc/cni/net.d
--network-config-dir /tmp/podman_test2968516396/root/etc/networks
--network-backend netavark
--cgroup-manager systemd
--tmpdir /tmp/podman_test553496330
--tmpdir /tmp/podman_test2968516396
--events-backend file
--storage-driver vfs
--url unix:/run/user/12345/podman-xyz.sock">[options]</span><b> pod rm -fa</b>
<span class="timestamp"> </span>4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 again
<span class="timestamp">[+0107s] </span>
</pre>
<hr />
<pre>
<span class="timestamp">[+0523s] </span>Podman play kube with build
<span class="timestamp"> </span><a name='t----build-should-override-image-in-store--1'><h2> --build should override image in store</h2></a>
<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/play_build_test.go#L215'>/containers/podman/test/e2e/play_build_test.go:215</a>
<span class="timestamp">[+0479s] </span>
</pre>
<hr />
<pre>
<span class="timestamp">[+0479s] </span>Podman pod rm
<span class="timestamp"> </span><a name='t--podman-pod-rm--a-doesnt-remove-a-running-container--1'><h2> podman pod rm -a doesn&#39;t remove a running container</h2></a>
<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/pod_rm_test.go#L119'>/containers/podman/test/e2e/pod_rm_test.go:119</a>
<span class="timestamp">[+1405s] </span>
</pre>
<hr />
<pre>
<span class="timestamp">[+1405s] </span>Podman run entrypoint
<span class="timestamp"> </span><a name='t--podman-run-entrypoint---1'><h2> podman run entrypoint == [&quot;&quot;]</h2></a>
<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/run_entrypoint_test.go#L47'>/containers/podman/test/e2e/run_entrypoint_test.go:47</a>
<span class="timestamp">[+0184s] </span>S <span class="log-skip">[SKIPPING] [3.086 seconds]</span>
<span class="timestamp">[+1385s] </span>S <span class="log-skip">[SKIPPING] in Spec Setup (BeforeEach) [0.001 seconds]</span>
<span class="timestamp">[+1512s] </span>Summarizing 6 Failures:
[+1512s]
<span class="timestamp"> </span><b>[Fail] Podman play kube with build [It] <a href='#t----build-should-override-image-in-store--1'>--build should override image in store</a></b>
<span class="timestamp"> </span>/var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/play_build_test.go#L259'>/containers/podman/test/e2e/play_build_test.go:259</a>
--db-backend sqlite
--storage-driver vfs">[options]</span><b> pod rm -fa -t 0</b>
<span class="timestamp"> </span><span class="boring"> #</span> <span title="/var/tmp/go/src/github.com/containers/podman/bin/podman"><b>podman</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/imagecachedir
--root /tmp/podman_test2968516396/root
--runroot /tmp/podman_test2968516396/runroot
--runtime crun
--conmon /usr/bin/conmon
--network-config-dir /tmp/podman_test2968516396/root/etc/networks
--network-backend netavark
--cgroup-manager systemd
--tmpdir /tmp/podman_test2968516396
--events-backend file
--db-backend sqlite
--storage-driver vfs">[options]</span><b> rm -fa -t 0</b>
<span class="timestamp"> </span> 7f5f8fb3d043984cdff65994d14c4fd157479d20e0a0fcf769c35b50e8975edc
<span class="timestamp"> </span> &larr; Exit [AfterEach] Podman restart - /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/074143b0fac7af72cd92048d27931a92fe745084/test/e2e/restart_test.go#L30'>/containers/podman/test/e2e/restart_test.go:30</a> @ 04/17/23 10:00:31.979 (645ms)
</div><span class="timestamp"> </span> &lt;&lt; Timeline
== simple python

View File

@ -403,9 +403,6 @@ dotest() {
}
_run_machine() {
# This environment is convenient for executing some benchmarking
localbenchmarks
# N/B: Can't use _bail_if_test_can_be_skipped here b/c content isn't under test/
make localmachine |& logformatter
}

4
go.mod
View File

@ -42,7 +42,7 @@ require (
github.com/mattn/go-sqlite3 v1.14.16
github.com/moby/term v0.0.0-20230430223545-0564e01cfe5d
github.com/nxadm/tail v1.4.8
github.com/onsi/ginkgo v1.16.5
github.com/onsi/ginkgo/v2 v2.9.2
github.com/onsi/gomega v1.27.6
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
@ -110,12 +110,14 @@ require (
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.12.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-containerregistry v0.13.0 // indirect
github.com/google/go-intervals v0.0.2 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/google/trillian v1.5.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect

3
go.sum
View File

@ -445,6 +445,7 @@ github.com/go-rod/rod v0.112.6 h1:zMirUmhsBeshMWyf285BD0UGtGq54HfThLDGSjcP3lU=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
@ -768,9 +769,9 @@ github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU=
github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts=
github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=

View File

@ -1,133 +0,0 @@
#!/usr/bin/perl
#
# parse-localbenchmarks - convert localbenchmarks output to CSV
#
# This is a filter. It transforms data from one format to another. Usage:
#
# $ make localbenchmarks &> mylogfile
# $ hack/parse-localbenchmarks <mylogfile > benchmarks.csv
#
# To be more precise, this is a very stupid simpleminded filter. It is
# not a complete solution to the benchmarks problem. In particular,
# other tools are still needed to:
#
# * Actually _run_ the benchmarks in some standard production environment
# * Run this script on the results
# * Save results, with identifying tags (datetime, git hash, PR id, ...)
# * Compare two or more sets of CSVs
#
(our $ME = $0) =~ s|^.*/||; # script name
use v5.14;
use utf8;
# FIXME: add --help. Some day. Not urgent.
die "$ME: This is a filter, not an interactive tool\n" if -t *STDIN;
my $n_samples; # Number of timing runs (FIXME: unused)
my %results; # Timing results
my @benchmarks; # Names of benchmarks
my ($type, $testname); # Current context
#
# Pass 1: read in timings
#
while (my $line = <STDIN>) {
# Log will have lots of ginkgo output. The only thing we care about is
# the summary at the end, which will look something like:
#
# * [MEASUREMENT]
# Podman Benchmark Suite
# ....
# Ran 3 samples:
# [CPU] podman images:
# Fastest Time: 0.265s
# Slowest Time: 0.322s
# Average Time: 0.302s ± 0.018s
# [MEM] podman images:
# Smallest: 44076.0KB
# Largest: 44616.0KB
# Average: 44338.7KB ± 171.2KB
# [CPU] podman push:
# ....repeat [CPU] and [MEM] for each test
# --------------------------
# SSSSSSSSSSSSSSSSSSSSS (and more ginkgo output we don't care about)
#
chomp $line;
next unless $line =~ /^.{1,3}\s+\[MEASUREMENT\]/ .. $line =~ /^-{20,}$/;
# Trim leading & trailing whitespace
$line =~ s/(^\s+|\s+$)//g;
# FIXME: we don't actually emit this. What would be a good way to do so?
if ($line =~ /^Ran\s+(\d+)\s+samples/) {
$n_samples = $1;
}
# e.g., [CPU] podman foo:
elsif ($line =~ /^\[([A-Z]+)\]\s+(\S.*\S):$/) {
($type, $testname) = ($1, $2);
}
# e.g., 'Fastest Time: 0.265s'
elsif ($line =~ /^(\S.*?\S):\s+(.*)/) {
log_result($testname, $type, $1, $2);
}
else {
warn "Cannot grok '$line'\n" if $ENV{DEBUG_PARSELOCALBENCHMARKS};
}
}
#
# Pass 2: write out CSV
#
# Headings...
print "\"Test Name\"";
printf ", \"%s\"", $_ for @benchmarks;
print "\n";
# ...then data
for my $t (sort keys %results) {
printf "\"%s\"", $t;
for my $benchmark (@benchmarks) {
printf ", \"%s\"", $results{$t}{$benchmark} || '';
}
print "\n";
}
exit 0;
################
# log_result # Preserve one record
################
sub log_result {
my $testname = shift; # in: test name (eg "podman foo")
my $type = shift; # in: CPU or MEM
my $name = shift; # in: benchmark name (eg "Fastest")
my $result = shift; # in: benchmark value
my $benchmark = "$type $name";
$results{$testname}{$benchmark} = $result;
# Keep an ordered list of benchmark names (as in, the order we
# encounter them)
push @benchmarks, $benchmark
unless grep { $_ eq $benchmark } @benchmarks;
# Special case: "Average X" may be of the form "xxx ± yyy". Move the
# standard deviation to its own column.
if ($name =~ /Average/) {
if ($results{$testname}{$benchmark} =~ s/^(\S+)\s+.*\s+(\S+)$/$1/) {
my ($average, $sd) = ($1, $2);
log_result($testname, $type, 'StdDev', $sd);
# Strip off units, so we can determine it as a percentage
$average =~ s/[a-z]+$//i;
$sd =~ s/[a-z]+$//i;
my $pct = sprintf("%.1f%%", $sd * 100.0 / $average);
log_result($testname, $type, 'StdDev (Percent)', $pct);
}
}
}

View File

@ -8,7 +8,7 @@ import (
"github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/bindings/containers"
"github.com/containers/podman/v4/pkg/specgen"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)

View File

@ -8,7 +8,7 @@ import (
"github.com/containers/image/v5/types"
podmanRegistry "github.com/containers/podman/v4/hack/podman-registry-go"
"github.com/containers/podman/v4/pkg/bindings/images"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)

View File

@ -13,7 +13,7 @@ import (
. "github.com/containers/podman/v4/pkg/bindings"
"github.com/containers/podman/v4/pkg/bindings/containers"
"github.com/containers/podman/v4/pkg/specgen"
"github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)

View File

@ -6,7 +6,7 @@ import (
"github.com/containers/podman/v4/pkg/bindings/containers"
"github.com/containers/podman/v4/pkg/bindings/system"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)

View File

@ -10,7 +10,7 @@ import (
"github.com/containers/podman/v4/pkg/bindings/containers"
"github.com/containers/podman/v4/pkg/domain/entities/reports"
"github.com/containers/podman/v4/pkg/specgen"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)

View File

@ -5,7 +5,7 @@ import (
"github.com/containers/podman/v4/pkg/bindings/containers"
"github.com/containers/podman/v4/pkg/specgen"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)

View File

@ -5,7 +5,7 @@ import (
"github.com/containers/podman/v4/pkg/api/handlers"
"github.com/containers/podman/v4/pkg/bindings/containers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)

View File

@ -2,7 +2,7 @@ package bindings_test
import (
"github.com/containers/podman/v4/pkg/bindings/containers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gstruct"
)

View File

@ -13,7 +13,7 @@ import (
"github.com/containers/podman/v4/pkg/bindings/containers"
"github.com/containers/podman/v4/pkg/bindings/images"
"github.com/containers/podman/v4/pkg/domain/entities"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
. "github.com/onsi/gomega/gstruct"
@ -47,7 +47,7 @@ var _ = Describe("Podman images", func() {
AfterEach(func() {
// podmanTest.Cleanup()
// f := CurrentGinkgoTestDescription()
// f := CurrentSpecReport()
// processTestResult(f)
s.Kill()
bt.cleanup()

View File

@ -8,7 +8,7 @@ import (
"github.com/containers/podman/v4/pkg/bindings/images"
"github.com/containers/podman/v4/pkg/bindings/system"
"github.com/containers/podman/v4/pkg/specgen"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)

View File

@ -10,7 +10,7 @@ import (
"github.com/containers/podman/v4/pkg/bindings"
"github.com/containers/podman/v4/pkg/bindings/images"
"github.com/containers/podman/v4/pkg/bindings/manifests"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)

View File

@ -10,7 +10,7 @@ import (
"github.com/containers/podman/v4/pkg/bindings"
"github.com/containers/podman/v4/pkg/bindings/containers"
"github.com/containers/podman/v4/pkg/bindings/network"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)

View File

@ -13,7 +13,7 @@ import (
"github.com/containers/podman/v4/pkg/errorhandling"
"github.com/containers/podman/v4/pkg/specgen"
"github.com/containers/podman/v4/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)

View File

@ -16,7 +16,7 @@ import (
"github.com/containers/podman/v4/pkg/bindings/images"
"github.com/containers/podman/v4/pkg/bindings/pods"
"github.com/containers/podman/v4/pkg/bindings/system"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)

View File

@ -8,7 +8,7 @@ import (
"github.com/containers/podman/v4/pkg/bindings"
"github.com/containers/podman/v4/pkg/bindings/secrets"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)

View File

@ -10,7 +10,7 @@ import (
"github.com/containers/podman/v4/pkg/bindings/volumes"
"github.com/containers/podman/v4/pkg/domain/entities"
"github.com/containers/podman/v4/pkg/domain/entities/reports"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)

View File

@ -3,7 +3,7 @@ package bindings_test
import (
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/sirupsen/logrus"
)

View File

@ -6,7 +6,7 @@ import (
"github.com/containers/podman/v4/pkg/bindings/images"
"github.com/containers/podman/v4/pkg/bindings/kube"
"github.com/containers/podman/v4/pkg/bindings/manifests"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

View File

@ -11,7 +11,7 @@ import (
"github.com/containers/podman/v4/pkg/bindings/volumes"
"github.com/containers/podman/v4/pkg/domain/entities"
"github.com/containers/podman/v4/pkg/domain/entities/reports"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
)

View File

@ -1,7 +1,7 @@
package e2e_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)

View File

@ -12,7 +12,7 @@ import (
"github.com/containers/podman/v4/pkg/machine"
"github.com/containers/podman/v4/pkg/util"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -50,8 +50,6 @@ type machineTestBuilder struct {
// number of seconds
func (ms *machineSession) waitWithTimeout(timeout time.Duration) {
Eventually(ms, timeout).Should(Exit())
os.Stdout.Sync()
os.Stderr.Sync()
}
func (ms *machineSession) Bytes() []byte {
@ -154,7 +152,7 @@ func runWrapper(podmanBinary string, cmdArgs []string, timeout time.Duration, wa
if len(os.Getenv("DEBUG")) > 0 {
cmdArgs = append([]string{"--log-level=debug"}, cmdArgs...)
}
fmt.Println(podmanBinary + " " + strings.Join(cmdArgs, " "))
GinkgoWriter.Println(podmanBinary + " " + strings.Join(cmdArgs, " "))
c := exec.Command(podmanBinary, cmdArgs...)
session, err := Start(c, GinkgoWriter, GinkgoWriter)
if err != nil {
@ -164,7 +162,6 @@ func runWrapper(podmanBinary string, cmdArgs []string, timeout time.Duration, wa
ms := machineSession{session}
if wait {
ms.waitWithTimeout(timeout)
fmt.Println("output:", ms.outputToString())
}
return &ms, nil
}

View File

@ -3,7 +3,7 @@ package e2e_test
import (
"github.com/containers/podman/v4/pkg/domain/entities"
jsoniter "github.com/json-iterator/go"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)

View File

@ -7,7 +7,7 @@ import (
"github.com/containers/podman/v4/pkg/machine"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)

View File

@ -6,7 +6,7 @@ import (
"github.com/containers/podman/v4/pkg/machine"
jsoniter "github.com/json-iterator/go"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)

View File

@ -7,7 +7,7 @@ import (
"github.com/containers/common/pkg/util"
"github.com/containers/podman/v4/pkg/domain/entities"
jsoniter "github.com/json-iterator/go"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)

View File

@ -13,7 +13,7 @@ import (
"github.com/containers/podman/v4/pkg/machine"
"github.com/containers/podman/v4/pkg/machine/qemu"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
@ -61,7 +61,7 @@ var _ = BeforeSuite(func() {
if err := machine.DownloadVMImage(getMe, suiteImageName, fqImageName+".xz"); err != nil {
Fail(fmt.Sprintf("unable to download machine image: %q", err))
}
fmt.Println("Download took: ", time.Since(now).String())
GinkgoWriter.Println("Download took: ", time.Since(now).String())
if err := machine.Decompress(fqImageName+".xz", fqImageName); err != nil {
Fail(fmt.Sprintf("unable to decompress image file: %q", err))
}
@ -71,10 +71,7 @@ var _ = BeforeSuite(func() {
}
})
var _ = SynchronizedAfterSuite(func() {},
func() {
fmt.Println("After")
})
var _ = SynchronizedAfterSuite(func() {}, func() {})
func setup() (string, *machineTestBuilder) {
// Set TMPDIR if this needs a new directory
@ -127,7 +124,7 @@ func teardown(origHomeDir string, testDir string, mb *machineTestBuilder) {
r := new(rmMachine)
for _, name := range mb.names {
if _, err := mb.setName(name).setCmd(r.withForce()).run(); err != nil {
fmt.Printf("error occurred rm'ing machine: %q\n", err)
GinkgoWriter.Printf("error occurred rm'ing machine: %q\n", err)
}
}
if err := machine.GuardedRemoveAll(testDir); err != nil {

View File

@ -1,7 +1,7 @@
package e2e_test
// import (
// . "github.com/onsi/ginkgo"
// . "github.com/onsi/ginkgo/v2"
// . "github.com/onsi/gomega"
// . "github.com/onsi/gomega/gexec"
// )

View File

@ -1,7 +1,7 @@
package e2e_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)

View File

@ -3,7 +3,7 @@ package e2e_test
import (
"strconv"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)

View File

@ -1,7 +1,7 @@
package e2e_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)

View File

@ -2,7 +2,7 @@ package e2e_test
import (
"github.com/containers/podman/v4/pkg/machine"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)

View File

@ -1,7 +1,7 @@
package e2e_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)

View File

@ -5,7 +5,7 @@ import (
"time"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -26,7 +26,7 @@ var _ = Describe("Podman attach", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -1,271 +0,0 @@
//go:build benchmarks
// +build benchmarks
package integration
import (
"fmt"
"os"
"path"
"strconv"
"strings"
podmanRegistry "github.com/containers/podman/v4/hack/podman-registry-go"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
"github.com/sirupsen/logrus"
)
var (
// Number of times to execute each benchmark.
numBenchmarkSamples = 3
// All benchmarks are ququed here.
allBenchmarks []benchmark
)
// An internal struct for queuing benchmarks.
type benchmark struct {
// The name of the benchmark.
name string
// The function to execute.
main func()
// Allows for extending a benchmark.
options newBenchmarkOptions
}
var benchmarkRegistry *podmanRegistry.Registry
// Allows for customizing the benchnmark in an easy to extend way.
type newBenchmarkOptions struct {
// Sets the benchmark's init function.
init func()
// Run a local registry for this benchmark. Use `getPortUserPass()` in
// the benchmark to get the port, user and password.
needsRegistry bool
}
// Queue a new benchmark.
func newBenchmark(name string, main func(), options *newBenchmarkOptions) {
bm := benchmark{name: name, main: main}
if options != nil {
bm.options = *options
}
allBenchmarks = append(allBenchmarks, bm)
}
// getPortUserPass returns the port, user and password of the currently running
// registry.
func getPortUserPass() (string, string, string) {
if benchmarkRegistry == nil {
return "", "", ""
}
return benchmarkRegistry.Port, benchmarkRegistry.User, benchmarkRegistry.Password
}
var _ = Describe("Podman Benchmark Suite", func() {
var (
timedir string
podmanTest *PodmanTestIntegration
)
setup := func() {
tempdir, err := CreateTempDirInTempDir()
if err != nil {
os.Exit(1)
}
podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
timedir, err = CreateTempDirInTempDir()
if err != nil {
os.Exit(1)
}
}
cleanup := func() {
podmanTest.Cleanup()
os.RemoveAll(timedir)
// Stop the local registry.
if benchmarkRegistry != nil {
if err := benchmarkRegistry.Stop(); err != nil {
logrus.Errorf("Error stopping registry: %v", err)
os.Exit(1)
}
benchmarkRegistry = nil
}
}
totalMemoryInKb := func() (total uint64) {
files, err := os.ReadDir(timedir)
if err != nil {
Fail(fmt.Sprintf("Error reading timing dir: %v", err))
}
for _, f := range files {
if f.IsDir() {
continue
}
raw, err := os.ReadFile(path.Join(timedir, f.Name()))
if err != nil {
Fail(fmt.Sprintf("Error reading timing file: %v", err))
}
rawS := strings.TrimSuffix(string(raw), "\n")
number, err := strconv.ParseUint(rawS, 10, 64)
if err != nil {
Fail(fmt.Sprintf("Error converting timing file to numeric value: %v", err))
}
total += number
}
return total
}
// Make sure to clean up after the benchmarks.
AfterEach(func() {
cleanup()
})
// All benchmarks are executed here to have *one* table listing all data.
Measure("Podman Benchmark Suite", func(b Benchmarker) {
registryOptions := &podmanRegistry.Options{
Image: "docker-archive:" + imageTarPath(REGISTRY_IMAGE),
}
for i := range allBenchmarks {
setup()
bm := allBenchmarks[i]
// Start a local registry if requested.
if bm.options.needsRegistry {
reg, err := podmanRegistry.StartWithOptions(registryOptions)
if err != nil {
logrus.Errorf("Error starting registry: %v", err)
os.Exit(1)
}
benchmarkRegistry = reg
}
if bm.options.init != nil {
bm.options.init()
}
// Set the time dir only for the main() function.
os.Setenv(EnvTimeDir, timedir)
b.Time("[CPU] "+bm.name, bm.main)
os.Unsetenv(EnvTimeDir)
mem := totalMemoryInKb()
b.RecordValueWithPrecision("[MEM] "+bm.name, float64(mem), "KB", 1)
cleanup()
}
}, numBenchmarkSamples)
BeforeEach(func() {
// --------------------------------------------------------------------------
// IMAGE BENCHMARKS
// --------------------------------------------------------------------------
newBenchmark("podman images", func() {
session := podmanTest.Podman([]string{"images"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
}, nil)
newBenchmark("podman push", func() {
port, user, pass := getPortUserPass()
session := podmanTest.Podman([]string{"push", "--tls-verify=false", "--creds", user + ":" + pass, SYSTEMD_IMAGE, "localhost:" + port + "/repo/image:tag"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
}, &newBenchmarkOptions{needsRegistry: true})
newBenchmark("podman pull", func() {
port, user, pass := getPortUserPass()
session := podmanTest.Podman([]string{"pull", "--tls-verify=false", "--creds", user + ":" + pass, "localhost:" + port + "/repo/image:tag"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
}, &newBenchmarkOptions{
needsRegistry: true,
init: func() {
port, user, pass := getPortUserPass()
session := podmanTest.Podman([]string{"push", "--tls-verify=false", "--creds", user + ":" + pass, SYSTEMD_IMAGE, "localhost:" + port + "/repo/image:tag"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
},
})
newBenchmark("podman load [docker]", func() {
session := podmanTest.Podman([]string{"load", "-i", "./testdata/docker-two-images.tar.xz"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
}, nil)
newBenchmark("podman load [oci]", func() {
session := podmanTest.Podman([]string{"load", "-i", "./testdata/oci-registry-name.tar.gz"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
}, nil)
newBenchmark("podman save", func() {
session := podmanTest.Podman([]string{"save", ALPINE, "-o", path.Join(podmanTest.TempDir, "alpine.tar")})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
}, nil)
newBenchmark("podman image inspect", func() {
session := podmanTest.Podman([]string{"inspect", ALPINE})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
}, nil)
newBenchmark("podman login + logout", func() {
port, user, pass := getPortUserPass()
session := podmanTest.Podman([]string{"login", "-u", user, "-p", pass, "--tls-verify=false", "localhost:" + port})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
session = podmanTest.Podman([]string{"logout", "localhost:" + port})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
}, &newBenchmarkOptions{needsRegistry: true})
// --------------------------------------------------------------------------
// CONTAINER BENCHMARKS
// --------------------------------------------------------------------------
newBenchmark("podman create", func() {
session := podmanTest.Podman([]string{"create", ALPINE, "true"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
}, nil)
newBenchmark("podman start", func() {
session := podmanTest.Podman([]string{"start", "foo"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
}, &newBenchmarkOptions{
init: func() {
session := podmanTest.Podman([]string{"create", "--name=foo", ALPINE, "true"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
},
})
newBenchmark("podman run", func() {
session := podmanTest.Podman([]string{"run", ALPINE, "true"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
}, nil)
newBenchmark("podman run --detach", func() {
session := podmanTest.Podman([]string{"run", "--detach", ALPINE, "true"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
}, nil)
})
})

View File

@ -11,7 +11,7 @@ import (
"github.com/containers/buildah"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -34,7 +34,7 @@ var _ = Describe("Podman build", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})
@ -884,7 +884,8 @@ RUN ls /dev/test1`, ALPINE)
Expect(build).To(Exit(0))
})
It("podman system reset must clean host shared cache", func() {
// system reset must run serial: https://github.com/containers/podman/issues/17903
It("podman system reset must clean host shared cache", Serial, func() {
SkipIfRemote("podman-remote does not have system reset -f")
useCustomNetworkDir(podmanTest, tempdir)
podmanTest.AddImageToRWStore(ALPINE)

View File

@ -8,7 +8,7 @@ import (
"github.com/containers/podman/v4/pkg/criu"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -46,7 +46,7 @@ var _ = Describe("Podman checkpoint", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -16,7 +16,7 @@ import (
"github.com/containers/podman/v4/pkg/domain/entities"
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/podman/v4/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -66,7 +66,7 @@ var _ = Describe("Podman checkpoint", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})
@ -1072,7 +1072,7 @@ var _ = Describe("Podman checkpoint", func() {
Fail("Container failed to get ready")
}
fmt.Fprintf(os.Stderr, "Trying to connect to redis server at localhost:%d", randomPort)
GinkgoWriter.Printf("Trying to connect to redis server at localhost:%d\n", randomPort)
// Open a network connection to the redis server via initial port mapping
conn, err := net.DialTimeout("tcp4", fmt.Sprintf("localhost:%d", randomPort), time.Duration(3)*time.Second)
Expect(err).ShouldNot(HaveOccurred())
@ -1105,7 +1105,7 @@ var _ = Describe("Podman checkpoint", func() {
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring("connection refused"))
// Open a network connection to the redis server via new port mapping
fmt.Fprintf(os.Stderr, "Trying to reconnect to redis server at localhost:%d", newRandomPort)
GinkgoWriter.Printf("Trying to reconnect to redis server at localhost:%d\n", newRandomPort)
conn, err = net.DialTimeout("tcp4", fmt.Sprintf("localhost:%d", newRandomPort), time.Duration(3)*time.Second)
Expect(err).ShouldNot(HaveOccurred())
conn.Close()

View File

@ -4,7 +4,7 @@ import (
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -28,7 +28,7 @@ var _ = Describe("Podman container cleanup", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})
@ -124,5 +124,11 @@ var _ = Describe("Podman container cleanup", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(125))
Expect(session.ErrorToString()).To(ContainSubstring("container state improper"))
// unpause so that the cleanup can stop the container,
// otherwise it fails with container state improper
session = podmanTest.Podman([]string{"unpause", "paused"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
})
})

View File

@ -6,7 +6,7 @@ import (
"strings"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -27,7 +27,7 @@ var _ = Describe("Podman commit", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -1,6 +1,7 @@
package integration
import (
"bufio"
"bytes"
"errors"
"fmt"
@ -26,7 +27,7 @@ import (
"github.com/containers/storage/pkg/reexec"
"github.com/containers/storage/pkg/stringid"
jsoniter "github.com/json-iterator/go"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
"github.com/sirupsen/logrus"
@ -105,7 +106,7 @@ var _ = SynchronizedBeforeSuite(func() []byte {
// make cache dir
ImageCacheDir = filepath.Join(os.TempDir(), "imagecachedir")
if err := os.MkdirAll(ImageCacheDir, 0700); err != nil {
fmt.Printf("%q\n", err)
GinkgoWriter.Printf("%q\n", err)
os.Exit(1)
}
@ -122,7 +123,7 @@ var _ = SynchronizedBeforeSuite(func() []byte {
}
if err := os.MkdirAll(filepath.Join(ImageCacheDir, podman.ImageCacheFS+"-images"), 0777); err != nil {
fmt.Printf("%q\n", err)
GinkgoWriter.Printf("%q\n", err)
os.Exit(1)
}
podman.Root = ImageCacheDir
@ -134,19 +135,19 @@ var _ = SynchronizedBeforeSuite(func() []byte {
if host.Distribution == "rhel" && strings.HasPrefix(host.Version, "7") {
f, err := os.OpenFile("/proc/sys/user/max_user_namespaces", os.O_WRONLY, 0644)
if err != nil {
fmt.Println("Unable to enable userspace on RHEL 7")
GinkgoWriter.Println("Unable to enable userspace on RHEL 7")
os.Exit(1)
}
_, err = f.WriteString("15000")
if err != nil {
fmt.Println("Unable to enable userspace on RHEL 7")
GinkgoWriter.Println("Unable to enable userspace on RHEL 7")
os.Exit(1)
}
f.Close()
}
path, err := os.MkdirTemp("", "libpodlock")
if err != nil {
fmt.Println(err)
GinkgoWriter.Println(err)
os.Exit(1)
}
@ -167,12 +168,41 @@ func (p *PodmanTestIntegration) Setup() {
INTEGRATION_ROOT = filepath.Join(cwd, "../../")
}
var _ = SynchronizedAfterSuite(func() {},
var _ = SynchronizedAfterSuite(func() {
f, err := os.Create(fmt.Sprintf("%s/timings-%d", LockTmpDir, GinkgoParallelProcess()))
Expect(err).ToNot(HaveOccurred())
defer f.Close()
for _, result := range testResults {
_, err := f.WriteString(fmt.Sprintf("%s\t\t%f\n", result.name, result.length))
Expect(err).ToNot(HaveOccurred(), "write timings")
}
},
func() {
sort.Sort(testResultsSortedLength{testResults})
fmt.Println("integration timing results")
for _, result := range testResults {
fmt.Printf("%s\t\t%f\n", result.name, result.length)
testTimings := make(testResultsSorted, 0, 2000)
for i := 1; i <= GinkgoT().ParallelTotal(); i++ {
f, err := os.Open(fmt.Sprintf("%s/timings-%d", LockTmpDir, i))
Expect(err).ToNot(HaveOccurred())
defer f.Close()
scanner := bufio.NewScanner(f)
for scanner.Scan() {
text := scanner.Text()
timing := strings.SplitN(text, "\t\t", 2)
if len(timing) != 2 {
Fail(fmt.Sprintf("incorrect timing line: %q", text))
}
name := timing[0]
duration, err := strconv.ParseFloat(timing[1], 64)
Expect(err).ToNot(HaveOccurred(), "failed to parse float from timings file")
testTimings = append(testTimings, testResult{name: name, length: duration})
}
if err := scanner.Err(); err != nil {
Expect(err).ToNot(HaveOccurred(), "read timings %d", i)
}
}
sort.Sort(testResultsSortedLength{testTimings})
GinkgoWriter.Println("integration timing results")
for _, result := range testTimings {
GinkgoWriter.Printf("%s\t\t%f\n", result.name, result.length)
}
// previous runroot
@ -184,7 +214,7 @@ var _ = SynchronizedAfterSuite(func() {},
defer os.RemoveAll(tempdir)
if err := os.RemoveAll(podmanTest.Root); err != nil {
fmt.Printf("%q\n", err)
GinkgoWriter.Printf("%q\n", err)
}
// If running remote, we need to stop the associated podman system service
@ -376,7 +406,7 @@ func (p *PodmanTestIntegration) createArtifact(image string) {
}
destName := imageTarPath(image)
if _, err := os.Stat(destName); os.IsNotExist(err) {
fmt.Printf("Caching %s at %s...\n", image, destName)
GinkgoWriter.Printf("Caching %s at %s...\n", image, destName)
pull := p.PodmanNoCache([]string{"pull", image})
pull.Wait(440)
Expect(pull).Should(Exit(0))
@ -384,9 +414,9 @@ func (p *PodmanTestIntegration) createArtifact(image string) {
save := p.PodmanNoCache([]string{"save", "-o", destName, image})
save.Wait(90)
Expect(save).Should(Exit(0))
fmt.Printf("\n")
GinkgoWriter.Printf("\n")
} else {
fmt.Printf("[image already cached: %s]\n", destName)
GinkgoWriter.Printf("[image already cached: %s]\n", destName)
}
}
@ -408,8 +438,8 @@ func (p *PodmanTestIntegration) InspectContainer(name string) []define.InspectCo
return session.InspectContainerToJSON()
}
func processTestResult(f GinkgoTestDescription) {
tr := testResult{length: f.Duration.Seconds(), name: f.TestText}
func processTestResult(r SpecReport) {
tr := testResult{length: r.RunTime.Seconds(), name: r.LeafNodeText}
testResultsMutex.Lock()
testResults = append(testResults, tr)
testResultsMutex.Unlock()
@ -419,7 +449,7 @@ func GetPortLock(port string) *lockfile.LockFile {
lockFile := filepath.Join(LockTmpDir, port)
lock, err := lockfile.GetLockFile(lockFile)
if err != nil {
fmt.Println(err)
GinkgoWriter.Println(err)
os.Exit(1)
}
lock.Lock()
@ -534,7 +564,7 @@ func (p *PodmanTestIntegration) BuildImageWithLabel(dockerfile, imageName string
// PodmanPID execs podman and returns its PID
func (p *PodmanTestIntegration) PodmanPID(args []string) (*PodmanSessionIntegration, int) {
podmanOptions := p.MakeOptions(args, false, false)
fmt.Printf("Running: %s %s\n", p.PodmanBinary, strings.Join(podmanOptions, " "))
GinkgoWriter.Printf("Running: %s %s\n", p.PodmanBinary, strings.Join(podmanOptions, " "))
command := exec.Command(p.PodmanBinary, podmanOptions...)
session, err := Start(command, GinkgoWriter, GinkgoWriter)
@ -546,7 +576,7 @@ func (p *PodmanTestIntegration) PodmanPID(args []string) (*PodmanSessionIntegrat
}
func (p *PodmanTestIntegration) Quadlet(args []string, sourceDir string) *PodmanSessionIntegration {
fmt.Printf("Running: %s %s with QUADLET_UNIT_DIRS=%s\n", p.QuadletBinary, strings.Join(args, " "), sourceDir)
GinkgoWriter.Printf("Running: %s %s with QUADLET_UNIT_DIRS=%s\n", p.QuadletBinary, strings.Join(args, " "), sourceDir)
// quadlet uses PODMAN env to get a stable podman path
podmanPath, found := os.LookupEnv("PODMAN")
@ -569,6 +599,17 @@ func (p *PodmanTestIntegration) Quadlet(args []string, sourceDir string) *Podman
// Cleanup cleans up the temporary store
func (p *PodmanTestIntegration) Cleanup() {
// ginkgo v2 still goes into AfterEach() when Skip() was called,
// some tests call skip before the podman test is initialized.
if p == nil {
return
}
// first stop everything, rm -fa is unreliable
// https://github.com/containers/podman/issues/18180
stop := p.Podman([]string{"stop", "--all", "-t", "0"})
stop.WaitWithDefaultTimeout()
// Remove all pods...
podrm := p.Podman([]string{"pod", "rm", "-fa", "-t", "0"})
podrm.WaitWithDefaultTimeout()
@ -583,30 +624,39 @@ func (p *PodmanTestIntegration) Cleanup() {
// Clean up the registries configuration file ENV variable set in Create
resetRegistriesConfigEnv()
// Make sure to only check exit codes after all cleanup is done.
// An error would cause it to stop and return early otherwise.
Expect(stop).To(Exit(0), "command: %v\nstdout: %s\nstderr: %s", stop.Command.Args, stop.OutputToString(), stop.ErrorToString())
Expect(podrm).To(Exit(0), "command: %v\nstdout: %s\nstderr: %s", podrm.Command.Args, podrm.OutputToString(), podrm.ErrorToString())
// FIXME: Remove this special case when the issue is fixed.
// Special case rm -fa is not working correctly with dependencies, https://github.com/containers/podman/issues/18180
if !strings.Contains(rmall.ErrorToString(), "has dependent containers which must be removed before it") {
Expect(rmall).To(Exit(0), "command: %v\nstdout: %s\nstderr: %s", rmall.Command.Args, rmall.OutputToString(), rmall.ErrorToString())
}
}
// CleanupVolume cleans up the temporary store
// CleanupVolume cleans up the volumes and containers.
// This already calls Cleanup() internally.
func (p *PodmanTestIntegration) CleanupVolume() {
// Remove all containers
session := p.Podman([]string{"volume", "rm", "-fa"})
session.Wait(90)
session.WaitWithDefaultTimeout()
p.Cleanup()
Expect(session).To(Exit(0), "command: %v\nstdout: %s\nstderr: %s", session.Command.Args, session.OutputToString(), session.ErrorToString())
}
// CleanupSecret cleans up the temporary store
// CleanupSecret cleans up the secrets and containers.
// This already calls Cleanup() internally.
func (p *PodmanTestIntegration) CleanupSecrets() {
// Remove all containers
session := p.Podman([]string{"secret", "rm", "-a"})
session.Wait(90)
// Stop remove service on secret cleanup
p.StopRemoteService()
// Nuke tempdir
if err := os.RemoveAll(p.TempDir); err != nil {
fmt.Printf("%q\n", err)
}
p.Cleanup()
Expect(session).To(Exit(0), "command: %v\nstdout: %s\nstderr: %s", session.Command.Args, session.OutputToString(), session.ErrorToString())
}
// InspectContainerToJSON takes the session output of an inspect
@ -665,7 +715,7 @@ func (p *PodmanTestIntegration) RunHealthCheck(cid string) error {
ps.WaitWithDefaultTimeout()
if ps.ExitCode() == 0 {
if !strings.Contains(ps.OutputToString(), cid) {
fmt.Printf("Container %s is not running, restarting", cid)
GinkgoWriter.Printf("Container %s is not running, restarting", cid)
restart := p.Podman([]string{"restart", cid})
restart.WaitWithDefaultTimeout()
if restart.ExitCode() != 0 {
@ -673,7 +723,7 @@ func (p *PodmanTestIntegration) RunHealthCheck(cid string) error {
}
}
}
fmt.Printf("Waiting for %s to pass healthcheck\n", cid)
GinkgoWriter.Printf("Waiting for %s to pass healthcheck\n", cid)
time.Sleep(1 * time.Second)
}
return fmt.Errorf("unable to detect %s as running", cid)
@ -885,7 +935,7 @@ func (p *PodmanTestIntegration) RestartRemoteService() {
func (p *PodmanTestIntegration) RestoreArtifactToCache(image string) error {
tarball := imageTarPath(image)
if _, err := os.Stat(tarball); err == nil {
fmt.Printf("Restoring %s...\n", image)
GinkgoWriter.Printf("Restoring %s...\n", image)
p.Root = p.ImageCacheDir
restore := p.PodmanNoEvents([]string{"load", "-q", "-i", tarball})
restore.WaitWithDefaultTimeout()
@ -899,7 +949,7 @@ func populateCache(podman *PodmanTestIntegration) {
Expect(err).ToNot(HaveOccurred())
}
// logformatter uses this to recognize the first test
fmt.Printf("-----------------------------\n")
GinkgoWriter.Printf("-----------------------------\n")
}
func (p *PodmanTestIntegration) removeCache(path string) {
@ -907,14 +957,14 @@ func (p *PodmanTestIntegration) removeCache(path string) {
if isRootless() {
// If rootless, os.RemoveAll() is failed due to permission denied
cmd := exec.Command(p.PodmanBinary, "unshare", "rm", "-rf", path)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Stdout = GinkgoWriter
cmd.Stderr = GinkgoWriter
if err := cmd.Run(); err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
GinkgoWriter.Printf("%v\n", err)
}
} else {
if err := os.RemoveAll(path); err != nil {
fmt.Printf("%q\n", err)
GinkgoWriter.Printf("%q\n", err)
}
}
}
@ -971,17 +1021,17 @@ func (p *PodmanTestIntegration) makeOptions(args []string, noEvents, noCache boo
func writeConf(conf []byte, confPath string) {
if _, err := os.Stat(filepath.Dir(confPath)); os.IsNotExist(err) {
if err := os.MkdirAll(filepath.Dir(confPath), 0o777); err != nil {
fmt.Println(err)
GinkgoWriter.Println(err)
}
}
if err := os.WriteFile(confPath, conf, 0o777); err != nil {
fmt.Println(err)
GinkgoWriter.Println(err)
}
}
func removeConf(confPath string) {
if err := os.Remove(confPath); err != nil {
fmt.Println(err)
GinkgoWriter.Println(err)
}
}
@ -1158,7 +1208,7 @@ func ncz(port int) bool {
timeout := 500 * time.Millisecond
for i := 0; i < 5; i++ {
ncCmd := []string{"-z", "localhost", fmt.Sprintf("%d", port)}
fmt.Printf("Running: nc %s\n", strings.Join(ncCmd, " "))
GinkgoWriter.Printf("Running: nc %s\n", strings.Join(ncCmd, " "))
check := SystemExec("nc", ncCmd)
if check.ExitCode() == 0 {
return true

View File

@ -4,7 +4,7 @@ import (
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -28,7 +28,7 @@ var _ = Describe("Podman container clone", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -6,7 +6,7 @@ import (
"path/filepath"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -86,7 +86,7 @@ var _ = Describe("Podman create data volume", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
os.Unsetenv("CONTAINERS_CONF")
})

View File

@ -6,7 +6,7 @@ import (
"github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/annotations"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -29,7 +29,7 @@ var _ = Describe("Podman container inspect", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -9,7 +9,7 @@ import (
"github.com/containers/podman/v4/libpod/define"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gbytes"
. "github.com/onsi/gomega/gexec"
@ -37,11 +37,11 @@ var _ = Describe("Verify podman containers.conf usage", func() {
})
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
processTestResult(f)
os.Unsetenv("CONTAINERS_CONF")
os.Unsetenv("CONTAINERS_CONF_OVERRIDE")
podmanTest.Cleanup()
f := CurrentSpecReport()
processTestResult(f)
})
It("limits test", func() {
@ -231,6 +231,8 @@ var _ = Describe("Verify podman containers.conf usage", func() {
Expect(hostNS).To(Equal(ctrNS))
session = podmanTest.Podman([]string{"run", option, "private", ALPINE, "ls", "-l", nspath})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
fields = strings.Split(session.OutputToString(), " ")
ctrNS = fields[len(fields)-1]
Expect(hostNS).ToNot(Equal(ctrNS))

View File

@ -7,7 +7,7 @@ import (
"path/filepath"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -34,7 +34,7 @@ var _ = Describe("Podman cp", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -5,7 +5,7 @@ import (
"time"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -30,7 +30,7 @@ var _ = Describe("Podman create with --ip flag", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -5,7 +5,7 @@ import (
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -30,7 +30,7 @@ var _ = Describe("Podman run with --mac-address flag", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -9,7 +9,7 @@ import (
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -30,7 +30,7 @@ var _ = Describe("Podman create", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -7,7 +7,7 @@ import (
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -30,7 +30,7 @@ var _ = Describe("Podman diff", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -10,7 +10,7 @@ import (
"github.com/containers/podman/v4/libpod/events"
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -33,7 +33,7 @@ var _ = Describe("Podman events", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})
@ -96,7 +96,7 @@ var _ = Describe("Podman events", func() {
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
events := result.OutputToStringArray()
fmt.Println(events)
GinkgoWriter.Println(events)
Expect(len(events)).To(BeNumerically(">=", 2), "Number of events")
Expect(events).To(ContainElement(ContainSubstring(" pod create ")))
Expect(events).To(ContainElement(ContainSubstring(" pod stop ")))

View File

@ -7,7 +7,7 @@ import (
"strings"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -30,7 +30,7 @@ var _ = Describe("Podman exec", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -4,7 +4,7 @@ import (
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -27,7 +27,7 @@ var _ = Describe("Podman image|container exists", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -5,7 +5,7 @@ import (
"path/filepath"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -28,7 +28,7 @@ var _ = Describe("Podman export", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -12,7 +12,7 @@ import (
v1 "github.com/containers/podman/v4/pkg/k8s.io/api/core/v1"
"github.com/containers/podman/v4/pkg/util"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
"sigs.k8s.io/yaml"
@ -36,7 +36,7 @@ var _ = Describe("Podman kube generate", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -5,7 +5,7 @@ import (
"path/filepath"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -29,7 +29,7 @@ var _ = Describe("Podman generate spec", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -5,7 +5,7 @@ import (
"strings"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -28,7 +28,7 @@ var _ = Describe("Podman generate systemd", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -8,7 +8,7 @@ import (
define "github.com/containers/podman/v4/libpod/define"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -31,9 +31,8 @@ var _ = Describe("Podman healthcheck run", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
_, _ = GinkgoWriter.Write([]byte(timedResult))
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -4,7 +4,7 @@ import (
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -27,7 +27,7 @@ var _ = Describe("Podman history", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -7,7 +7,7 @@ import (
"github.com/containers/common/pkg/config"
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/storage/pkg/homedir"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -45,7 +45,7 @@ var _ = Describe("podman image scp", func() {
} else {
os.Unsetenv("CONTAINERS_CONF")
}
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -6,7 +6,7 @@ import (
"path/filepath"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -39,15 +39,15 @@ var _ = Describe("Podman image sign", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
os.Setenv("GNUPGHOME", origGNUPGHOME)
})
It("podman sign image", func() {
cmd := exec.Command("gpg", "--import", "sign/secret-key.asc")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Stdout = GinkgoWriter
cmd.Stderr = GinkgoWriter
err := cmd.Run()
Expect(err).ToNot(HaveOccurred())
sigDir := filepath.Join(podmanTest.TempDir, "test-sign")
@ -62,8 +62,8 @@ var _ = Describe("Podman image sign", func() {
It("podman sign --all multi-arch image", func() {
cmd := exec.Command("gpg", "--import", "sign/secret-key.asc")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Stdout = GinkgoWriter
cmd.Stderr = GinkgoWriter
err := cmd.Run()
Expect(err).ToNot(HaveOccurred())
sigDir := filepath.Join(podmanTest.TempDir, "test-sign-multi")

View File

@ -8,7 +8,7 @@ import (
. "github.com/containers/podman/v4/test/utils"
"github.com/docker/go-units"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -31,7 +31,7 @@ var _ = Describe("Podman images", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -5,7 +5,7 @@ import (
"path/filepath"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -28,7 +28,7 @@ var _ = Describe("Podman import", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -8,7 +8,7 @@ import (
"path/filepath"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -31,7 +31,7 @@ var _ = Describe("Podman Info", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -4,7 +4,7 @@ import (
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -27,7 +27,7 @@ var _ = Describe("Podman init", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -4,7 +4,7 @@ import (
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
"github.com/opencontainers/selinux/go-selinux"
@ -28,7 +28,7 @@ var _ = Describe("Podman inspect", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -4,7 +4,7 @@ import (
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -27,7 +27,7 @@ var _ = Describe("Podman kill", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -13,6 +13,7 @@ import (
"syscall"
"time"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
@ -85,9 +86,9 @@ func (p *PodmanTestIntegration) StartRemoteService() {
fmt.Sprintf("%s.imagestore=%s", p.PodmanTest.ImageCacheFS, p.PodmanTest.ImageCacheDir)}
podmanOptions = append(cacheOptions, podmanOptions...)
command := exec.Command(p.PodmanBinary, podmanOptions...)
command.Stdout = os.Stdout
command.Stderr = os.Stderr
fmt.Printf("Running: %s %s\n", p.PodmanBinary, strings.Join(podmanOptions, " "))
command.Stdout = GinkgoWriter
command.Stderr = GinkgoWriter
GinkgoWriter.Printf("Running: %s %s\n", p.PodmanBinary, strings.Join(podmanOptions, " "))
err := command.Start()
Expect(err).ToNot(HaveOccurred())
command.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
@ -98,18 +99,18 @@ func (p *PodmanTestIntegration) StartRemoteService() {
func (p *PodmanTestIntegration) StopRemoteService() {
if err := p.RemoteSession.Kill(); err != nil {
fmt.Fprintf(os.Stderr, "unable to clean up service %d, %v\n", p.RemoteSession.Pid, err)
GinkgoWriter.Printf("unable to clean up service %d, %v\n", p.RemoteSession.Pid, err)
}
if _, err := p.RemoteSession.Wait(); err != nil {
fmt.Fprintf(os.Stderr, "error on remote stop-wait %q", err)
GinkgoWriter.Printf("error on remote stop-wait %q", err)
}
socket := strings.Split(p.RemoteSocket, ":")[1]
if err := os.Remove(socket); err != nil && !errors.Is(err, os.ErrNotExist) {
fmt.Fprintf(os.Stderr, "%v\n", err)
GinkgoWriter.Printf("%v\n", err)
}
if p.RemoteSocketLock != "" {
if err := os.Remove(p.RemoteSocketLock); err != nil && !errors.Is(err, os.ErrNotExist) {
fmt.Fprintf(os.Stderr, "%v\n", err)
GinkgoWriter.Printf("%v\n", err)
}
}
}
@ -128,11 +129,11 @@ func getRemoteOptions(p *PodmanTestIntegration, args []string) []string {
func (p *PodmanTestIntegration) RestoreArtifact(image string) error {
tarball := imageTarPath(image)
if _, err := os.Stat(tarball); err == nil {
fmt.Printf("Restoring %s...\n", image)
GinkgoWriter.Printf("Restoring %s...\n", image)
args := []string{"load", "-q", "-i", tarball}
podmanOptions := getRemoteOptions(p, args)
command := exec.Command(p.PodmanBinary, podmanOptions...)
fmt.Printf("Running: %s %s\n", p.PodmanBinary, strings.Join(podmanOptions, " "))
GinkgoWriter.Printf("Running: %s %s\n", p.PodmanBinary, strings.Join(podmanOptions, " "))
if err := command.Start(); err != nil {
return err
}

View File

@ -4,10 +4,10 @@
package integration
import (
"fmt"
"os"
"path/filepath"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
@ -62,7 +62,7 @@ func PodmanTestCreate(tempDir string) *PodmanTestIntegration {
func (p *PodmanTestIntegration) RestoreArtifact(image string) error {
tarball := imageTarPath(image)
if _, err := os.Stat(tarball); err == nil {
fmt.Printf("Restoring %s...\n", image)
GinkgoWriter.Printf("Restoring %s...\n", image)
restore := p.PodmanNoEvents([]string{"load", "-q", "-i", tarball})
restore.Wait(90)
}

View File

@ -6,7 +6,7 @@ import (
"path/filepath"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -30,7 +30,7 @@ var _ = Describe("Podman load", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})
@ -40,7 +40,7 @@ var _ = Describe("Podman load", func() {
images := podmanTest.Podman([]string{"images"})
images.WaitWithDefaultTimeout()
fmt.Println(images.OutputToStringArray())
GinkgoWriter.Println(images.OutputToStringArray())
save := podmanTest.Podman([]string{"save", "-o", outfile, ALPINE})
save.WaitWithDefaultTimeout()

View File

@ -9,7 +9,7 @@ import (
"strings"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -110,7 +110,7 @@ var _ = Describe("Podman login and logout", func() {
var authInfo map[string]interface{}
err = json.Unmarshal(authBytes, &authInfo)
Expect(err).ToNot(HaveOccurred())
fmt.Println(authInfo)
GinkgoWriter.Println(authInfo)
const authsKey = "auths"
Expect(authInfo).To(HaveKey(authsKey))

View File

@ -9,7 +9,7 @@ import (
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -42,7 +42,7 @@ var _ = Describe("Podman logs", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -10,7 +10,7 @@ import (
podmanRegistry "github.com/containers/podman/v4/hack/podman-registry-go"
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/storage/pkg/archive"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -43,7 +43,7 @@ var _ = Describe("Podman manifest", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})
It("create w/o image and attempt push w/o dest", func() {

View File

@ -4,7 +4,7 @@ import (
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -29,7 +29,7 @@ var _ = Describe("Podman mount", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -4,7 +4,7 @@ import (
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -30,7 +30,7 @@ var _ = Describe("Podman mount", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -4,7 +4,7 @@ import (
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
@ -25,7 +25,7 @@ var _ = Describe("Podman negative command-line", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -5,7 +5,7 @@ import (
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
"github.com/onsi/gomega/types"
@ -29,7 +29,7 @@ var _ = Describe("Podman network connect and disconnect", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -8,7 +8,7 @@ import (
"github.com/containers/common/libnetwork/types"
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -36,7 +36,7 @@ var _ = Describe("Podman network create", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -10,7 +10,7 @@ import (
"github.com/containers/common/libnetwork/types"
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -33,7 +33,7 @@ var _ = Describe("Podman network", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -7,7 +7,7 @@ import (
"strings"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -48,7 +48,7 @@ var _ = Describe("Podman pause", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})
@ -151,6 +151,11 @@ var _ = Describe("Podman pause", func() {
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
Expect(strings.ToLower(podmanTest.GetContainerStatus())).To(ContainSubstring(pausedState))
// unpause so that the cleanup can stop the container,
// otherwise it fails with container state improper
session = podmanTest.Podman([]string{"unpause", cid})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
})
It("podman remove a paused container by id with force", func() {

View File

@ -10,7 +10,7 @@ import (
"path/filepath"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -33,7 +33,7 @@ var _ = Describe("Podman play kube with build", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -27,7 +27,7 @@ import (
"github.com/containers/podman/v4/utils"
"github.com/containers/storage/pkg/stringid"
"github.com/google/uuid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/format"
. "github.com/onsi/gomega/gexec"
@ -1873,7 +1873,7 @@ var _ = Describe("Podman play kube", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})
@ -2781,7 +2781,7 @@ var _ = Describe("Podman play kube", func() {
// expect play kube is expected to set a seccomp label if it's applied as an annotation
jsonFile, err := podmanTest.CreateSeccompJSON(seccompPwdEPERM)
if err != nil {
fmt.Println(err)
GinkgoWriter.Println(err)
Skip("Failed to prepare seccomp.json for test.")
}
@ -2808,7 +2808,7 @@ var _ = Describe("Podman play kube", func() {
// expect play kube is expected to set a seccomp label if it's applied as an annotation
jsonFile, err := podmanTest.CreateSeccompJSON(seccompPwdEPERM)
if err != nil {
fmt.Println(err)
GinkgoWriter.Println(err)
Skip("Failed to prepare seccomp.json for test.")
}
defer os.Remove(jsonFile)

View File

@ -4,7 +4,7 @@ import (
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -29,7 +29,7 @@ var _ = Describe("Podman pod clone", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -13,7 +13,7 @@ import (
"github.com/containers/common/pkg/sysinfo"
"github.com/containers/podman/v4/pkg/util"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
"github.com/opencontainers/selinux/go-selinux"
@ -38,7 +38,7 @@ var _ = Describe("Podman pod create", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -5,7 +5,7 @@ import (
"strconv"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -28,7 +28,7 @@ var _ = Describe("Podman pod create", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -7,7 +7,7 @@ import (
"github.com/containers/podman/v4/libpod/define"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -30,7 +30,7 @@ var _ = Describe("Podman init containers", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -6,7 +6,7 @@ import (
"github.com/containers/podman/v4/libpod/define"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -29,7 +29,7 @@ var _ = Describe("Podman pod inspect", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -1,11 +1,10 @@
package integration
import (
"fmt"
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -28,7 +27,7 @@ var _ = Describe("Podman pod kill", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})
@ -148,7 +147,7 @@ var _ = Describe("Podman pod kill", func() {
result := podmanTest.Podman([]string{"pod", "kill", "-a"})
result.WaitWithDefaultTimeout()
fmt.Println(result.OutputToString(), result.ErrorToString())
GinkgoWriter.Println(result.OutputToString(), result.ErrorToString())
Expect(result).Should(Exit(0))
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
})

View File

@ -4,7 +4,7 @@ import (
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -30,7 +30,7 @@ var _ = Describe("Podman pod pause", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -1,11 +1,10 @@
package integration
import (
"fmt"
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -28,7 +27,7 @@ var _ = Describe("Podman pod create", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})
@ -54,9 +53,9 @@ var _ = Describe("Podman pod create", func() {
Expect(outputArray).To(HaveLen(2))
NAMESPACE1 := outputArray[0]
fmt.Println("NAMESPACE1:", NAMESPACE1)
GinkgoWriter.Println("NAMESPACE1:", NAMESPACE1)
NAMESPACE2 := outputArray[1]
fmt.Println("NAMESPACE2:", NAMESPACE2)
GinkgoWriter.Println("NAMESPACE2:", NAMESPACE2)
Expect(NAMESPACE1).To(Equal(NAMESPACE2))
})
@ -100,9 +99,9 @@ var _ = Describe("Podman pod create", func() {
Expect(outputArray).To(HaveLen(2))
NAMESPACE1 := outputArray[0]
fmt.Println("NAMESPACE1:", NAMESPACE1)
GinkgoWriter.Println("NAMESPACE1:", NAMESPACE1)
NAMESPACE2 := outputArray[1]
fmt.Println("NAMESPACE2:", NAMESPACE2)
GinkgoWriter.Println("NAMESPACE2:", NAMESPACE2)
Expect(NAMESPACE1).To(Not(Equal(NAMESPACE2)))
})

View File

@ -4,7 +4,7 @@ import (
"os"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -27,7 +27,7 @@ var _ = Describe("Podman pod prune", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

View File

@ -7,7 +7,7 @@ import (
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
@ -30,7 +30,7 @@ var _ = Describe("Podman ps", func() {
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
f := CurrentSpecReport()
processTestResult(f)
})

Some files were not shown because too many files have changed in this diff Show More