From 01d5dad59a785ec772358f746be92834a8f0e996 Mon Sep 17 00:00:00 2001 From: Rebecca Mahany-Horton Date: Thu, 25 Jan 2024 09:41:04 -0500 Subject: [PATCH] Rename k2server => agentserver --- README.md | 6 +++--- tests/{k2server.py => agentserver.py} | 0 tests/kolide-launcher.nix | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) rename tests/{k2server.py => agentserver.py} (100%) diff --git a/README.md b/README.md index 1d9a90f..5089184 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ Then start the `kolide-launcher.service` service. live in the [./tests](./tests) directory and are included via flake checks. They are currently intended to run in CI only. -#### Running the mock K2 server +#### Running the mock agent server -To run the mock K2 server locally for testing purposes, you can run -`python3 -m flask --app k2server run` from the `tests` directory. +To run the mock agent server locally for testing purposes, you can run +`python3 -m flask --app agentserver run` from the `tests` directory. diff --git a/tests/k2server.py b/tests/agentserver.py similarity index 100% rename from tests/k2server.py rename to tests/agentserver.py diff --git a/tests/kolide-launcher.nix b/tests/kolide-launcher.nix index 2a1b74e..7f25406 100644 --- a/tests/kolide-launcher.nix +++ b/tests/kolide-launcher.nix @@ -44,7 +44,7 @@ pkgs.nixosTest { system.stateVersion = "23.11"; - # Set up mock k2 server locally + # Set up mock agent server locally networking.extraHosts = "127.0.0.1 app.kolide.test"; services.uwsgi = { enable = true; @@ -52,14 +52,14 @@ pkgs.nixosTest { capabilities = [ "CAP_NET_BIND_SERVICE" ]; instance.type = "emperor"; - instance.vassals.k2server = { + instance.vassals.agentserver = { type = "normal"; module = "wsgi:application"; http = ":80"; http-timeout = 30; cap = "net_bind_service"; pythonPackages = self: [ self.flask ]; - chdir = pkgs.writeTextDir "wsgi.py" (builtins.readFile ./k2server.py); + chdir = pkgs.writeTextDir "wsgi.py" (builtins.readFile ./agentserver.py); }; }; }; @@ -77,7 +77,7 @@ pkgs.nixosTest { if "${ci}": machine.start() - with subtest("mock K2 server starts up"): + with subtest("mock agent server starts up"): machine.wait_for_unit("network-online.target") machine.wait_for_unit("uwsgi.service") machine.wait_until_succeeds("curl --fail http://app.kolide.test/version", timeout=60)