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 {};
|
allTerminfo = handleTest ./all-terminfo.nix {};
|
||||||
alps = handleTest ./alps.nix {};
|
alps = handleTest ./alps.nix {};
|
||||||
amazon-init-shell = handleTest ./amazon-init-shell.nix {};
|
amazon-init-shell = handleTest ./amazon-init-shell.nix {};
|
||||||
|
amazon-ssm-agent = handleTest ./amazon-ssm-agent.nix {};
|
||||||
amd-sev = runTest ./amd-sev.nix;
|
amd-sev = runTest ./amd-sev.nix;
|
||||||
anbox = runTest ./anbox.nix;
|
anbox = runTest ./anbox.nix;
|
||||||
anuko-time-tracker = handleTest ./anuko-time-tracker.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
|
, dmidecode
|
||||||
, bashInteractive
|
, bashInteractive
|
||||||
, nix-update-script
|
, nix-update-script
|
||||||
|
, nixosTests
|
||||||
, testers
|
, testers
|
||||||
, amazon-ssm-agent
|
, amazon-ssm-agent
|
||||||
, overrideEtc ? true
|
, overrideEtc ? true
|
||||||
|
@ -136,12 +137,15 @@ buildGoModule rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateScript = nix-update-script { };
|
tests = {
|
||||||
tests.version = testers.testVersion {
|
inherit (nixosTests) amazon-ssm-agent;
|
||||||
|
version = testers.testVersion {
|
||||||
package = amazon-ssm-agent;
|
package = amazon-ssm-agent;
|
||||||
command = "amazon-ssm-agent --version";
|
command = "amazon-ssm-agent --version";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
updateScript = nix-update-script { };
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Agent to enable remote management of your Amazon EC2 instance configuration";
|
description = "Agent to enable remote management of your Amazon EC2 instance configuration";
|
||||||
|
|
Loading…
Reference in a new issue