1 { system ? builtins.currentSystem
3 , pkgs ? import ../.. { inherit system config; }
7 with import ../lib/testing-python.nix { inherit system pkgs; };
10 packages = with pkgs; {
30 advertise_ip = "192.168.1.20";
31 auth_token = "8d1957b2-2ded-40e6-8297-d48156a898a9";
32 auth_servers = [ "192.168.1.10:3025" ];
33 log.severity = "DEBUG";
41 proxy_service.enabled = false;
42 auth_service.enabled = false;
45 networking.interfaces.eth1.ipv4.addresses = [{
46 address = "192.168.1.20";
58 advertise_ip = "192.168.1.10";
60 ssh_service.enabled = true;
61 proxy_service.enabled = true;
64 tokens = [ "node:8d1957b2-2ded-40e6-8297-d48156a898a9" ];
68 insecure.enable = true;
71 firewall.allowedTCPPorts = [ 3025 ];
72 interfaces.eth1.ipv4.addresses = [{
73 address = "192.168.1.10";
81 "minimal_${name}" = makeTest {
82 # minimal setup should always work
83 name = "teleport-minimal-setup";
84 meta.maintainers = with pkgs.lib.maintainers; [ justinas ];
85 nodes.minimal = minimal package;
88 minimal.wait_for_open_port(3025)
89 minimal.wait_for_open_port(3080)
90 minimal.wait_for_open_port(3022)
94 "basic_${name}" = makeTest {
95 # basic server and client test
96 name = "teleport-server-client";
97 meta.maintainers = with pkgs.lib.maintainers; [ justinas ];
99 server = server package;
100 client = client package;
104 with subtest("teleport ready"):
105 server.wait_for_open_port(3025)
106 client.wait_for_open_port(3022)
108 with subtest("check applied configuration"):
109 server.wait_until_succeeds("tctl get nodes --format=json | ${pkgs.jq}/bin/jq -e '.[] | select(.spec.hostname==\"client\") | .metadata.labels.role==\"client\"'")
110 server.wait_for_open_port(3000)
111 client.succeed("journalctl -u teleport.service --grep='DEBU'")
112 server.succeed("journalctl -u teleport.service --grep='Starting teleport in insecure mode.'")