Skip to content

Commit

Permalink
environment.links: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Feb 3, 2025
1 parent f3f83a4 commit 9dcfb00
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ in {
envoy = handleTest ./envoy.nix {};
environmentAliases = callTest ./environment-aliases.nix {};
environmentSkel = callTest ./environment-skel.nix {};
environmentLinks = callTest ./environment-links.nix {};
ergo = handleTest ./ergo.nix {};
ergochat = handleTest ./ergochat.nix {};
eris-server = handleTest ./eris-server.nix {};
Expand Down
21 changes: 21 additions & 0 deletions nixos/tests/environment-links.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import ./make-test.nix ({ pkgs, ...} : {
name = "environment-links";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ mkg20001 ];
};

nodes = {
machine = { config, lib, pkgs, ... }: {
environment.links = {
"bin/bash".source = "${pkgs.bash}/bin/bash";
};
};
};

testScript = {nodes, ...}: ''
$machine->start();
$machine->waitForUnit("default.target");
$machine->succeed("/bin/bash -c true");
'';
})

0 comments on commit 9dcfb00

Please sign in to comment.