diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 091f1462ad17..12b9f11fb6eb 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1301,7 +1301,7 @@ in { yabar = handleTest ./yabar.nix {}; ydotool = handleTest ./ydotool.nix {}; yggdrasil = handleTest ./yggdrasil.nix {}; - your_spotify = handleTest ./your_spotify.nix {}; + your_spotify = runTest ./your_spotify.nix; zammad = runTest ./zammad.nix; zenohd = runTest ./zenohd.nix; zeronet-conservancy = runTest ./zeronet-conservancy.nix; diff --git a/nixos/tests/your_spotify.nix b/nixos/tests/your_spotify.nix index 9fdc2dad8eb5..c4935face7df 100644 --- a/nixos/tests/your_spotify.nix +++ b/nixos/tests/your_spotify.nix @@ -1,36 +1,34 @@ -import ./make-test-python.nix ( - { pkgs, ... }: - { - name = "your_spotify"; - meta = with pkgs.lib.maintainers; { - maintainers = [ patrickdag ]; - }; +{ pkgs, ... }: +{ + name = "your_spotify"; + meta = with pkgs.lib.maintainers; { + maintainers = [ patrickdag ]; + }; - nodes.machine = { - services.your_spotify = { - enable = true; - spotifySecretFile = pkgs.writeText "spotifySecretFile" "deadbeef"; - settings = { - CLIENT_ENDPOINT = "http://localhost"; - API_ENDPOINT = "http://localhost:3000"; - SPOTIFY_PUBLIC = "beefdead"; - }; - enableLocalDB = true; - nginxVirtualHost = "localhost"; + nodes.machine = { + services.your_spotify = { + enable = true; + spotifySecretFile = pkgs.writeText "spotifySecretFile" "deadbeef"; + settings = { + CLIENT_ENDPOINT = "http://localhost"; + API_ENDPOINT = "http://localhost:3000"; + SPOTIFY_PUBLIC = "beefdead"; }; + enableLocalDB = true; + nginxVirtualHost = "localhost"; }; + }; - testScript = '' - machine.wait_for_unit("your_spotify.service") + testScript = '' + machine.wait_for_unit("your_spotify.service") - machine.wait_for_open_port(3000) - machine.wait_for_open_port(80) + machine.wait_for_open_port(3000) + machine.wait_for_open_port(80) - out = machine.succeed("curl --fail -X GET 'http://localhost:3000/'") - assert "Hello !" in out + out = machine.succeed("curl --fail -X GET 'http://localhost:3000/'") + assert "Hello !" in out - out = machine.succeed("curl --fail -X GET 'http://localhost:80/'") - assert "Your Spotify" in out - ''; - } -) + out = machine.succeed("curl --fail -X GET 'http://localhost:80/'") + assert "Your Spotify" in out + ''; +}