summary refs log tree commit diff
diff options
context:
space:
mode:
authorzowoq <59103226+zowoq@users.noreply.github.com>2021-12-09 08:32:24 +1000
committerzowoq <59103226+zowoq@users.noreply.github.com>2021-12-09 08:32:24 +1000
commit4df7ad53c78fc81ad71f463ce763d9bd536cf857 (patch)
treed43c958569cf5c79c8e6fcb0abdd2d965b13a95f
parente77e6332830dae00f5d6f7c1de25b1aebba1ce3e (diff)
downloadnixpkgs-4df7ad53c78fc81ad71f463ce763d9bd536cf857.tar
nixpkgs-4df7ad53c78fc81ad71f463ce763d9bd536cf857.tar.gz
nixpkgs-4df7ad53c78fc81ad71f463ce763d9bd536cf857.tar.bz2
nixpkgs-4df7ad53c78fc81ad71f463ce763d9bd536cf857.tar.lz
nixpkgs-4df7ad53c78fc81ad71f463ce763d9bd536cf857.tar.xz
nixpkgs-4df7ad53c78fc81ad71f463ce763d9bd536cf857.tar.zst
nixpkgs-4df7ad53c78fc81ad71f463ce763d9bd536cf857.zip
Revert "nixos/podman/tests: add workaround for broken import"
This reverts commit 9edf2e0ffd4ed8147fdd41ce3086290d4c0a2f30.

This seems to have been fixed.
-rw-r--r--nixos/tests/podman-dnsname.nix2
-rw-r--r--nixos/tests/podman-tls-ghostunnel.nix2
-rw-r--r--nixos/tests/podman.nix16
3 files changed, 10 insertions, 10 deletions
diff --git a/nixos/tests/podman-dnsname.nix b/nixos/tests/podman-dnsname.nix
index 9e4e8fdb08a..dd352f754dc 100644
--- a/nixos/tests/podman-dnsname.nix
+++ b/nixos/tests/podman-dnsname.nix
@@ -21,7 +21,7 @@ import ./make-test-python.nix (
       podman.wait_for_unit("sockets.target")
 
       with subtest("DNS works"): # also tests inter-container tcp routing
-        podman.succeed("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg")
+        podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg")
         podman.succeed(
           "podman run -d --name=webserver -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin -w ${webroot} scratchimg ${python3}/bin/python -m http.server 8000"
         )
diff --git a/nixos/tests/podman-tls-ghostunnel.nix b/nixos/tests/podman-tls-ghostunnel.nix
index b5836c43649..0e687b199b2 100644
--- a/nixos/tests/podman-tls-ghostunnel.nix
+++ b/nixos/tests/podman-tls-ghostunnel.nix
@@ -126,7 +126,7 @@ import ./make-test-python.nix (
           client.succeed("docker version")
 
           # via socket would be nicer
-          podman.succeed("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg")
+          podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg")
 
           client.succeed(
             "docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
diff --git a/nixos/tests/podman.nix b/nixos/tests/podman.nix
index 6184561e6dd..7eae575fd7f 100644
--- a/nixos/tests/podman.nix
+++ b/nixos/tests/podman.nix
@@ -48,7 +48,7 @@ import ./make-test-python.nix (
       start_all()
 
       with subtest("Run container as root with runc"):
-          podman.succeed("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg")
+          podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg")
           podman.succeed(
               "podman run --runtime=runc -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
           )
@@ -57,7 +57,7 @@ import ./make-test-python.nix (
           podman.succeed("podman rm sleeping")
 
       with subtest("Run container as root with crun"):
-          podman.succeed("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg")
+          podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg")
           podman.succeed(
               "podman run --runtime=crun -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
           )
@@ -66,7 +66,7 @@ import ./make-test-python.nix (
           podman.succeed("podman rm sleeping")
 
       with subtest("Run container as root with the default backend"):
-          podman.succeed("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg")
+          podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg")
           podman.succeed(
               "podman run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
           )
@@ -78,7 +78,7 @@ import ./make-test-python.nix (
       podman.succeed("loginctl enable-linger alice")
 
       with subtest("Run container rootless with runc"):
-          podman.succeed(su_cmd("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg"))
+          podman.succeed(su_cmd("tar cv --files-from /dev/null | podman import - scratchimg"))
           podman.succeed(
               su_cmd(
                   "podman run --runtime=runc -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
@@ -89,7 +89,7 @@ import ./make-test-python.nix (
           podman.succeed(su_cmd("podman rm sleeping"))
 
       with subtest("Run container rootless with crun"):
-          podman.succeed(su_cmd("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg"))
+          podman.succeed(su_cmd("tar cv --files-from /dev/null | podman import - scratchimg"))
           podman.succeed(
               su_cmd(
                   "podman run --runtime=crun -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
@@ -100,7 +100,7 @@ import ./make-test-python.nix (
           podman.succeed(su_cmd("podman rm sleeping"))
 
       with subtest("Run container rootless with the default backend"):
-          podman.succeed(su_cmd("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg"))
+          podman.succeed(su_cmd("tar cv --files-from /dev/null | podman import - scratchimg"))
           podman.succeed(
               su_cmd(
                   "podman run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
@@ -112,7 +112,7 @@ import ./make-test-python.nix (
 
       with subtest("Run container with init"):
           podman.succeed(
-              "tar cvf busybox.tar -C ${pkgs.pkgsStatic.busybox} . && podman import busybox.tar busybox"
+              "tar cv -C ${pkgs.pkgsStatic.busybox} . | podman import - busybox"
           )
           pid = podman.succeed("podman run --rm busybox readlink /proc/self").strip()
           assert pid == "1"
@@ -124,7 +124,7 @@ import ./make-test-python.nix (
 
       with subtest("Run container via docker cli"):
           podman.succeed("docker network create default")
-          podman.succeed("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg")
+          podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg")
           podman.succeed(
             "docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
           )