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