nixosTests.google-oslogin: handleTest -> runTest

This commit is contained in:
Sizhe Zhao
2025-07-09 00:16:41 +08:00
parent 7b09056b8f
commit cdab66d5b8
2 changed files with 71 additions and 68 deletions

View File

@@ -613,7 +613,7 @@ in
gokapi = runTest ./gokapi.nix; gokapi = runTest ./gokapi.nix;
gollum = runTest ./gollum.nix; gollum = runTest ./gollum.nix;
gonic = runTest ./gonic.nix; gonic = runTest ./gonic.nix;
google-oslogin = handleTest ./google-oslogin { }; google-oslogin = runTest ./google-oslogin;
gopro-tool = runTest ./gopro-tool.nix; gopro-tool = runTest ./gopro-tool.nix;
goss = runTest ./goss.nix; goss = runTest ./goss.nix;
gotenberg = runTest ./gotenberg.nix; gotenberg = runTest ./gotenberg.nix;

View File

@@ -1,7 +1,11 @@
import ../make-test-python.nix ( {
{ pkgs, ... }: lib,
let pkgs,
inherit (import ./../ssh-keys.nix pkgs) hostPkgs,
...
}:
let
inherit (import ./../ssh-keys.nix hostPkgs)
snakeOilPrivateKey snakeOilPrivateKey
snakeOilPublicKey snakeOilPublicKey
; ;
@@ -12,16 +16,16 @@ import ../make-test-python.nix (
StrictHostKeyChecking=no StrictHostKeyChecking=no
IdentityFile=~/.ssh/id_snakeoil IdentityFile=~/.ssh/id_snakeoil
''; '';
in in
{ {
name = "google-oslogin"; name = "google-oslogin";
meta = with pkgs.lib.maintainers; { meta = with lib.maintainers; {
maintainers = [ ]; maintainers = [ ];
}; };
nodes = { nodes = {
# the server provides both the the mocked google metadata server and the ssh server # the server provides both the the mocked google metadata server and the ssh server
server = (import ./server.nix pkgs); server = ./server.nix;
client = { ... }: { }; client = { ... }: { };
}; };
@@ -74,5 +78,4 @@ import ../make-test-python.nix (
f"ssh {MOCKADMIN}@server '/run/wrappers/bin/sudo /run/current-system/sw/bin/id' | grep -q 'root'" f"ssh {MOCKADMIN}@server '/run/wrappers/bin/sudo /run/current-system/sw/bin/id' | grep -q 'root'"
) )
''; '';
} }
)