about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorAnthony Roussel <anthony@roussel.dev>2023-10-25 11:29:11 +0200
committerAnthony Roussel <anthony@roussel.dev>2023-11-09 12:02:53 +0100
commit4f7eab6de1fb2c3abee2b0fd7cc503752f60270a (patch)
treef173f2cfbf94445a854da9843c41a52a5a49a936 /nixos/tests
parent3dd50eaa8ff6dff42837b8f5ae45106bdeb35d8f (diff)
downloadnixlib-4f7eab6de1fb2c3abee2b0fd7cc503752f60270a.tar
nixlib-4f7eab6de1fb2c3abee2b0fd7cc503752f60270a.tar.gz
nixlib-4f7eab6de1fb2c3abee2b0fd7cc503752f60270a.tar.bz2
nixlib-4f7eab6de1fb2c3abee2b0fd7cc503752f60270a.tar.lz
nixlib-4f7eab6de1fb2c3abee2b0fd7cc503752f60270a.tar.xz
nixlib-4f7eab6de1fb2c3abee2b0fd7cc503752f60270a.tar.zst
nixlib-4f7eab6de1fb2c3abee2b0fd7cc503752f60270a.zip
nixosTests.amazon-ssm-agent: init
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/amazon-ssm-agent.nix17
2 files changed, 18 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index f44fcfcf54ab..a0796721e80e 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -117,6 +117,7 @@ in {
   allTerminfo = handleTest ./all-terminfo.nix {};
   alps = handleTest ./alps.nix {};
   amazon-init-shell = handleTest ./amazon-init-shell.nix {};
+  amazon-ssm-agent = handleTest ./amazon-ssm-agent.nix {};
   amd-sev = runTest ./amd-sev.nix;
   anbox = runTest ./anbox.nix;
   anuko-time-tracker = handleTest ./anuko-time-tracker.nix {};
diff --git a/nixos/tests/amazon-ssm-agent.nix b/nixos/tests/amazon-ssm-agent.nix
new file mode 100644
index 000000000000..957e9e0e02c5
--- /dev/null
+++ b/nixos/tests/amazon-ssm-agent.nix
@@ -0,0 +1,17 @@
+import ./make-test-python.nix ({ lib, pkgs, ... }: {
+  name = "amazon-ssm-agent";
+  meta.maintainers = [ lib.maintainers.anthonyroussel ];
+
+  nodes.machine = { config, pkgs, ... }: {
+    services.amazon-ssm-agent.enable = true;
+  };
+
+  testScript = ''
+    start_all()
+
+    machine.wait_for_file("/etc/amazon/ssm/seelog.xml")
+    machine.wait_for_file("/etc/amazon/ssm/amazon-ssm-agent.json")
+
+    machine.wait_for_unit("amazon-ssm-agent.service")
+  '';
+})