blob: c292d9fd76f515d47bd87c70de593366709f6642 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
let
hostIp = "fc00::2";
localIp = "fc00::1";
in
import <nixpkgs/nixos/tests/make-test.nix> ( { pkgs, ... }: {
machine =
{ config, pkgs, lib, ... }: {
containers.shape2 = {
privateNetwork = true;
hostAddress6 = hostIp;
localAddress6 = localIp;
config = import ../machines/container-shape.nix {
inherit config pkgs lib;
};
};
};
testScript = ''
$machine->waitForUnit("default.target");
$machine->succeed("nixos-container list") =~ /shape2/ or die;
$machine->succeed("nixos-container start shape2");
$machine->succeed("nixos-container run shape2 -- hostname") =~ /shape/ or die;
$machine->succeed("nixos-container run shape2 -- test -e /init");
'';
})
|