Merge pull request #88106 from zowoq/tests
podman packages: add passthru tests
This commit is contained in:
commit
9aebaa1704
7 changed files with 44 additions and 6 deletions
|
@ -38,23 +38,45 @@ import ./make-test-python.nix (
|
|||
start_all()
|
||||
|
||||
|
||||
with subtest("Run container as root"):
|
||||
with subtest("Run container as root with runc"):
|
||||
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"
|
||||
"podman run --runtime=runc -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
|
||||
)
|
||||
podman.succeed("podman ps | grep sleeping")
|
||||
podman.succeed("podman stop sleeping")
|
||||
podman.succeed("podman rm sleeping")
|
||||
|
||||
with subtest("Run container rootless"):
|
||||
with subtest("Run container as root with crun"):
|
||||
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"
|
||||
)
|
||||
podman.succeed("podman ps | grep sleeping")
|
||||
podman.succeed("podman stop sleeping")
|
||||
podman.succeed("podman rm sleeping")
|
||||
|
||||
with subtest("Run container rootless with runc"):
|
||||
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"
|
||||
"podman run --runtime=runc -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10"
|
||||
)
|
||||
)
|
||||
podman.succeed(su_cmd("podman ps | grep sleeping"))
|
||||
podman.succeed(su_cmd("podman stop sleeping"))
|
||||
podman.succeed(su_cmd("podman rm sleeping"))
|
||||
|
||||
with subtest("Run container rootless with crun"):
|
||||
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"
|
||||
)
|
||||
)
|
||||
podman.succeed(su_cmd("podman ps | grep sleeping"))
|
||||
podman.succeed(su_cmd("podman stop sleeping"))
|
||||
podman.succeed(su_cmd("podman rm sleeping"))
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, fetchFromGitHub, buildGoModule }:
|
||||
{ lib, fetchFromGitHub, buildGoModule, nixosTests }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "cni-plugins";
|
||||
|
@ -36,6 +36,8 @@ buildGoModule rec {
|
|||
"plugins/meta/tuning"
|
||||
];
|
||||
|
||||
passthru.tests.podman = nixosTests.podman;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Some standard networking plugins, maintained by the CNI team";
|
||||
homepage = "https://github.com/containernetworking/plugins";
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
, glib
|
||||
, glibc
|
||||
, systemd
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -23,6 +24,8 @@ stdenv.mkDerivation rec {
|
|||
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
passthru.tests.podman = nixosTests.podman;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/containers/conmon";
|
||||
description = "An OCI container runtime monitor";
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
, python3
|
||||
, systemd
|
||||
, yajl
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -62,6 +63,8 @@ stdenv.mkDerivation rec {
|
|||
|
||||
doCheck = true;
|
||||
|
||||
passthru.tests.podman = nixosTests.podman;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A fast and lightweight fully featured OCI runtime and C library for running containers";
|
||||
license = licenses.gpl2Plus;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
, apparmor-parser
|
||||
, libseccomp
|
||||
, libselinux
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
buildGoPackage rec {
|
||||
|
@ -45,6 +46,8 @@ buildGoPackage rec {
|
|||
installManPage man/*/*.[1-9]
|
||||
'';
|
||||
|
||||
passthru.tests.podman = nixosTests.podman;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/opencontainers/runc";
|
||||
description = "A CLI tool for spawning and running containers according to the OCI specification";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, autoreconfHook, pkg-config, fuse3 }:
|
||||
{ stdenv, fetchFromGitHub, autoreconfHook, pkg-config, fuse3, nixosTests }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fuse-overlayfs";
|
||||
|
@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs = [ fuse3 ];
|
||||
|
||||
passthru.tests.podman = nixosTests.podman;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "FUSE implementation for overlayfs";
|
||||
longDescription = "An implementation of overlay+shiftfs in FUSE for rootless containers.";
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
, libcap
|
||||
, libseccomp
|
||||
, libslirp
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -25,6 +26,8 @@ stdenv.mkDerivation rec {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.tests.podman = nixosTests.podman;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/rootless-containers/slirp4netns";
|
||||
description = "User-mode networking for unprivileged network namespaces";
|
||||
|
|
Loading…
Reference in a new issue