summaryrefslogtreecommitdiff
path: root/test/system/272-system-connection.bats
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2022-01-11 10:33:55 -0700
committerEd Santiago <santiago@redhat.com>2022-01-17 14:40:30 -0700
commit471a4356bfc57e37218afa6e2db4e9a58e53032b (patch)
tree29f956e3c01e9c8e4bea41e41e9dd8b877a24d44 /test/system/272-system-connection.bats
parentc8124b88aecf8b01f6376950b7caf1ba9f619988 (diff)
downloadpodman-471a4356bfc57e37218afa6e2db4e9a58e53032b.tar.gz
podman-471a4356bfc57e37218afa6e2db4e9a58e53032b.tar.bz2
podman-471a4356bfc57e37218afa6e2db4e9a58e53032b.zip
CI: rootless user: also create in some root tests
viz, rootful system tests. The rootless account will be used by image-scp tests. Unfortunately, having ssh available means the system-connection tests will start running, which is very bad because they will fail, because system connection doesn't actually work (long story). Add a few more checks to prevent this test from running. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/272-system-connection.bats')
-rw-r--r--test/system/272-system-connection.bats8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/system/272-system-connection.bats b/test/system/272-system-connection.bats
index 4e9ac4dd6..7b70f60f4 100644
--- a/test/system/272-system-connection.bats
+++ b/test/system/272-system-connection.bats
@@ -124,10 +124,14 @@ $c2[ ]\+tcp://localhost:54321[ ]\+true" \
# If we have ssh access to localhost (unlikely in CI), test that.
@test "podman system connection - ssh" {
- rand=$(random_string 20)
- echo $rand >$PODMAN_TMPDIR/testfile
+ # system connection only really works if we have an agent
+ run ssh-add -l
+ test "$status" -eq 0 || skip "Not running under ssh-agent"
+ test "${#lines[@]}" -ge 1 || skip "ssh agent has no identities"
# Can we actually ssh to localhost?
+ rand=$(random_string 20)
+ echo $rand >$PODMAN_TMPDIR/testfile
run ssh -q -o BatchMode=yes \
-o UserKnownHostsFile=/dev/null \
-o StrictHostKeyChecking=no \