1 import ./make-test-python.nix ({pkgs, ...}: {
3 meta = with pkgs.lib.maintainers; {
4 maintainers = [patrickdag];
8 services.your_spotify = {
10 spotifySecretFile = pkgs.writeText "spotifySecretFile" "deadbeef";
12 CLIENT_ENDPOINT = "http://localhost";
13 API_ENDPOINT = "http://localhost:3000";
14 SPOTIFY_PUBLIC = "beefdead";
17 nginxVirtualHost = "localhost";
22 machine.wait_for_unit("your_spotify.service")
24 machine.wait_for_open_port(3000)
25 machine.wait_for_open_port(80)
27 out = machine.succeed("curl --fail -X GET 'http://localhost:3000/'")
28 assert "Hello !" in out
30 out = machine.succeed("curl --fail -X GET 'http://localhost:80/'")
31 assert "<title>Your Spotify</title>" in out