Skip to content

Commit

Permalink
Rename k2server => agentserver
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Jan 25, 2024
1 parent ebf4b90 commit 01d5dad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
File renamed without changes.
8 changes: 4 additions & 4 deletions tests/kolide-launcher.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,22 @@ 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;
plugins = [ "python3" ];
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);
};
};
};
Expand All @@ -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)
Expand Down

0 comments on commit 01d5dad

Please sign in to comment.