From 53e3e52f25eede003f68860dc766d3966bb2487d Mon Sep 17 00:00:00 2001 From: Rebecca Mahany-Horton Date: Fri, 5 Jan 2024 14:20:30 -0500 Subject: [PATCH] More test updates --- tests/kolide-launcher.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/kolide-launcher.nix b/tests/kolide-launcher.nix index 6a09979..0c8654c 100644 --- a/tests/kolide-launcher.nix +++ b/tests/kolide-launcher.nix @@ -24,12 +24,22 @@ pkgs.nixosTest { testScript = { nodes, ... }: '' machine.start() - with subtest("launcher starts"): - machine.wait_for_file("/var/lib/kolide-k2/k2device.kolide.com/debug.json") + # TODO: currently launcher will shut itself down if its secret file doesn't exist, + # so we don't get all the way through setup and launcher doesn't stay running. + # In the future, we'll want to validate setup and that the service is running. with subtest("kolide-launcher service starts"): machine.wait_for_unit("kolide-launcher.service") + machine.systemctl("status kolide-launcher.service") + + machine.screenshot("test.png") - machine.shutdown() + with subtest("launcher set up correctly"): + machine.wait_for_file("/var/lib/kolide-k2/k2device.kolide.com/debug.json") + machine.wait_for_file("/var/lib/kolide-k2/k2device.kolide.com/kolide.png") + # machine.wait_for_file("/var/lib/kolide-k2/k2device.kolide.com/kv.sqlite") + machine.wait_for_file("/var/lib/kolide-k2/k2device.kolide.com/launcher.db") + machine.wait_for_file("/var/lib/kolide-k2/k2device.kolide.com/menu.json") + machine.wait_for_file("/var/lib/kolide-k2/k2device.kolide.com/osquery.db") ''; }