summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/01-basic.at8
-rw-r--r--test/e2e/common_test.go2
-rw-r--r--test/e2e/images_test.go7
-rw-r--r--test/system/015-help.bats14
-rw-r--r--test/system/070-build.bats32
5 files changed, 39 insertions, 24 deletions
diff --git a/test/apiv2/01-basic.at b/test/apiv2/01-basic.at
index 96b6aef7c..541d8cbf1 100644
--- a/test/apiv2/01-basic.at
+++ b/test/apiv2/01-basic.at
@@ -18,11 +18,11 @@ t HEAD libpod/_ping 200
for i in /version version; do
t GET $i 200 \
.Components[0].Name="Podman Engine" \
- .Components[0].Details.APIVersion=1.0.0 \
- .Components[0].Details.MinAPIVersion=1.0.0 \
+ .Components[0].Details.APIVersion=2.0.0 \
+ .Components[0].Details.MinAPIVersion=2.0.0 \
.Components[0].Details.Os=linux \
- .ApiVersion=1.0.0 \
- .MinAPIVersion=1.0.0 \
+ .ApiVersion=1.40 \
+ .MinAPIVersion=1.24 \
.Os=linux
done
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go
index b6bbae15b..2ce3f9760 100644
--- a/test/e2e/common_test.go
+++ b/test/e2e/common_test.go
@@ -432,7 +432,7 @@ func (p *PodmanTestIntegration) BuildImage(dockerfile, imageName string, layers
Expect(err).To(BeNil())
session := p.PodmanNoCache([]string{"build", "--layers=" + layers, "-t", imageName, "--file", dockerfilePath, p.TempDir})
session.Wait(120)
- Expect(session.ExitCode()).To(Equal(0))
+ Expect(session).Should(Exit(0), fmt.Sprintf("BuildImage session output: %q", session.OutputToString()))
}
// PodmanPID execs podman and returns its PID
diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go
index b22964dc1..a615a9f99 100644
--- a/test/e2e/images_test.go
+++ b/test/e2e/images_test.go
@@ -185,6 +185,7 @@ RUN apk update && apk add strace
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
Expect(len(result.OutputToStringArray()) >= 1).To(BeTrue())
+
})
It("podman images workingdir from image", func() {
@@ -226,7 +227,7 @@ WORKDIR /test
result := podmanTest.PodmanNoCache([]string{"image", "list", "-q", "-f", "after=docker.io/library/alpine:latest"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
- Expect(len(result.OutputToStringArray())).To(Equal(0))
+ Expect(result.OutputToStringArray()).Should(HaveLen(0), "list filter output: %q", result.OutputToString())
})
It("podman images filter dangling", func() {
@@ -236,8 +237,8 @@ WORKDIR /test
podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
result := podmanTest.Podman([]string{"images", "-q", "-f", "dangling=true"})
result.WaitWithDefaultTimeout()
- Expect(result).Should(Exit(0))
- Expect(len(result.OutputToStringArray())).To(Equal(0))
+ Expect(result).Should(Exit(0), "dangling image output: %q", result.OutputToString())
+ Expect(result.OutputToStringArray()).Should(HaveLen(0), "dangling image output: %q", result.OutputToString())
})
It("podman check for image with sha256: prefix", func() {
diff --git a/test/system/015-help.bats b/test/system/015-help.bats
index 4a3781012..651fdcd09 100644
--- a/test/system/015-help.bats
+++ b/test/system/015-help.bats
@@ -86,6 +86,20 @@ function check_help() {
found[takes_no_args]=1
fi
+ # If command lists "-l, --latest" in help output, combine -l with arg.
+ # This should be disallowed with a clear message.
+ if expr "$full_help" : ".*-l, --latest" >/dev/null; then
+ local nope="exec list port ps top" # these can't be tested
+ if is_rootless; then
+ nope="$nope mount restore" # these don't work rootless
+ fi
+ if ! grep -wq "$cmd" <<<$nope; then
+ run_podman 125 "$@" $cmd -l nonexistent-container
+ is "$output" "Error: .*--latest and \(containers\|pods\|arguments\) cannot be used together" \
+ "'$command_string' with both -l and container"
+ fi
+ fi
+
# If usage has required arguments, try running without them.
# The expression here is 'first capital letter is not in [BRACKETS]'.
# It is intended to handle 'podman foo [flags] ARG' but not ' [ARG]'.
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index 66f6610ea..e3a139b4f 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -1,4 +1,5 @@
#!/usr/bin/env bats -*- bats -*-
+# shellcheck disable=SC2096
#
# Tests for podman build
#
@@ -6,8 +7,6 @@
load helpers
@test "podman build - basic test" {
- skip_if_remote "FIXME: pending #7136"
-
rand_filename=$(random_string 20)
rand_content=$(random_string 50)
@@ -31,7 +30,7 @@ EOF
}
@test "podman build - global runtime flags test" {
- skip_if_remote "FIXME: pending #7136"
+ skip_if_remote "--runtime-flag flag not supported for remote"
rand_content=$(random_string 50)
@@ -49,11 +48,6 @@ EOF
# Regression from v1.5.0. This test passes fine in v1.5.0, fails in 1.6
@test "podman build - cache (#3920)" {
- skip_if_remote "FIXME: pending #7136, runtime flag is not passing over remote"
- if is_remote && is_rootless; then
- skip "unreliable with podman-remote and rootless; #2972"
- fi
-
# Make an empty test directory, with a subdirectory used for tar
tmpdir=$PODMAN_TMPDIR/build-test
mkdir -p $tmpdir/subtest || die "Could not mkdir $tmpdir/subtest"
@@ -97,8 +91,6 @@ EOF
}
@test "podman build - URLs" {
- skip_if_remote "FIXME: pending #7137"
-
tmpdir=$PODMAN_TMPDIR/build-test
mkdir -p $tmpdir
@@ -118,8 +110,6 @@ EOF
@test "podman build - workdir, cmd, env, label" {
- skip_if_remote "FIXME: pending #7137"
-
tmpdir=$PODMAN_TMPDIR/build-test
mkdir -p $tmpdir
@@ -194,8 +184,15 @@ EOF
build_test
is "${lines[0]}" "$workdir" "container default command: pwd"
is "${lines[1]}" "$s_echo" "container default command: output from echo"
+
is "${lines[2]}" "$s_env1" "container default command: env1"
- is "${lines[3]}" "$s_env2" "container default command: env2"
+
+ if is_remote; then
+ is "${lines[3]}" "this-should-be-overridden-by-env-host" "podman-remote does not send local environment"
+ else
+ is "${lines[3]}" "$s_env2" "container default command: env2"
+ fi
+
is "${lines[4]}" "$s_env3" "container default command: env3 (from envfile)"
is "${lines[5]}" "$s_env4" "container default command: env4 (from cmdline)"
@@ -206,7 +203,12 @@ EOF
printenv http_proxy https_proxy ftp_proxy
is "${lines[0]}" "http-proxy-in-env-file" "env-file overrides env"
is "${lines[1]}" "https-proxy-in-env-file" "env-file sets proxy var"
- is "${lines[2]}" "ftp-proxy-from-env" "ftp-proxy is passed through"
+
+ if is_remote; then
+ is "${lines[2]}" "ftp-proxy-in-image" "podman-remote does not send local environment"
+ else
+ is "${lines[2]}" "ftp-proxy-from-env" "ftp-proxy is passed through"
+ fi
# test that workdir is set for command-line commands also
run_podman run --rm build_test pwd
@@ -271,8 +273,6 @@ Labels.$label_name | $label_value
}
@test "podman build - stdin test" {
- skip_if_remote "FIXME: pending #7136"
-
# Random workdir, and random string to verify build output
workdir=/$(random_string 10)
random_echo=$(random_string 15)