lol

nixosTests.starship: migrate to runTest

Part of #386873

+43 -45
+1 -1
nixos/tests/all-tests.nix
··· 1202 1202 sssd-ldap = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./sssd-ldap.nix { }; 1203 1203 stalwart-mail = handleTest ./stalwart-mail.nix { }; 1204 1204 stargazer = runTest ./web-servers/stargazer.nix; 1205 - starship = handleTest ./starship.nix { }; 1205 + starship = runTest ./starship.nix; 1206 1206 stash = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./stash.nix { }; 1207 1207 static-web-server = handleTest ./web-servers/static-web-server.nix { }; 1208 1208 step-ca = handleTestOn [ "x86_64-linux" ] ./step-ca.nix { };
+42 -44
nixos/tests/starship.nix
··· 1 - import ./make-test-python.nix ( 2 - { pkgs, ... }: 3 - { 4 - name = "starship"; 5 - meta.maintainers = pkgs.starship.meta.maintainers; 1 + { pkgs, ... }: 2 + { 3 + name = "starship"; 4 + meta.maintainers = pkgs.starship.meta.maintainers; 6 5 7 - nodes.machine = { 8 - programs = { 9 - fish.enable = true; 10 - zsh.enable = true; 6 + nodes.machine = { 7 + programs = { 8 + fish.enable = true; 9 + zsh.enable = true; 11 10 12 - starship = { 13 - enable = true; 14 - settings.format = "<starship>"; 15 - }; 11 + starship = { 12 + enable = true; 13 + settings.format = "<starship>"; 16 14 }; 15 + }; 17 16 18 - environment.systemPackages = 19 - map 20 - ( 21 - shell: 22 - pkgs.writeScriptBin "expect-${shell}" '' 23 - #!${pkgs.expect}/bin/expect -f 17 + environment.systemPackages = 18 + map 19 + ( 20 + shell: 21 + pkgs.writeScriptBin "expect-${shell}" '' 22 + #!${pkgs.expect}/bin/expect -f 24 23 25 - spawn env TERM=xterm ${shell} -i 24 + spawn env TERM=xterm ${shell} -i 26 25 27 - expect "<starship>" { 28 - send "exit\n" 29 - } timeout { 30 - send_user "\n${shell} failed to display Starship\n" 31 - exit 1 32 - } 26 + expect "<starship>" { 27 + send "exit\n" 28 + } timeout { 29 + send_user "\n${shell} failed to display Starship\n" 30 + exit 1 31 + } 33 32 34 - expect eof 35 - '' 36 - ) 37 - [ 38 - "bash" 39 - "fish" 40 - "zsh" 41 - ]; 42 - }; 33 + expect eof 34 + '' 35 + ) 36 + [ 37 + "bash" 38 + "fish" 39 + "zsh" 40 + ]; 41 + }; 43 42 44 - testScript = '' 45 - start_all() 46 - machine.wait_for_unit("default.target") 43 + testScript = '' 44 + start_all() 45 + machine.wait_for_unit("default.target") 47 46 48 - machine.succeed("expect-bash") 49 - machine.succeed("expect-fish") 50 - machine.succeed("expect-zsh") 51 - ''; 52 - } 53 - ) 47 + machine.succeed("expect-bash") 48 + machine.succeed("expect-fish") 49 + machine.succeed("expect-zsh") 50 + ''; 51 + }