nixosTests.amazon-ssm-agent: init
This commit is contained in:
parent
3dd50eaa8f
commit
4f7eab6de1
3 changed files with 26 additions and 4 deletions
|
@ -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 {};
|
||||
|
|
17
nixos/tests/amazon-ssm-agent.nix
Normal file
17
nixos/tests/amazon-ssm-agent.nix
Normal file
|
@ -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")
|
||||
'';
|
||||
})
|
|
@ -10,6 +10,7 @@
|
|||
, dmidecode
|
||||
, bashInteractive
|
||||
, nix-update-script
|
||||
, nixosTests
|
||||
, testers
|
||||
, amazon-ssm-agent
|
||||
, overrideEtc ? true
|
||||
|
@ -136,12 +137,15 @@ buildGoModule rec {
|
|||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
tests.version = testers.testVersion {
|
||||
tests = {
|
||||
inherit (nixosTests) amazon-ssm-agent;
|
||||
version = testers.testVersion {
|
||||
package = amazon-ssm-agent;
|
||||
command = "amazon-ssm-agent --version";
|
||||
};
|
||||
};
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Agent to enable remote management of your Amazon EC2 instance configuration";
|
||||
|
|
Loading…
Reference in a new issue