nixosTests.amazon-cloudwatch-agent: migrate to runTest

Part Of #386873
This commit is contained in:
Martin Weinelt 2025-03-13 23:16:14 +01:00
parent 646a8a3356
commit 430ea8553b
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 79 additions and 81 deletions

View file

@ -162,7 +162,7 @@ in {
alloy = runTest ./alloy.nix; alloy = runTest ./alloy.nix;
allTerminfo = runTest ./all-terminfo.nix; allTerminfo = runTest ./all-terminfo.nix;
alps = runTest ./alps.nix; alps = runTest ./alps.nix;
amazon-cloudwatch-agent = handleTest ./amazon-cloudwatch-agent.nix {}; amazon-cloudwatch-agent = runTest ./amazon-cloudwatch-agent.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 {}; amazon-ssm-agent = handleTest ./amazon-ssm-agent.nix {};
amd-sev = runTest ./amd-sev.nix; amd-sev = runTest ./amd-sev.nix;

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix ( { pkgs, ... }:
{ lib, pkgs, ... }: let
let
# See https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html. # See https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html.
iniFormat = pkgs.formats.ini { }; iniFormat = pkgs.formats.ini { };
@ -24,8 +23,8 @@ import ./make-test-python.nix (
cp ${sharedConfigurationFile} $out/config cp ${sharedConfigurationFile} $out/config
cp ${sharedCredentialsFile} $out/credentials cp ${sharedCredentialsFile} $out/credentials
''; '';
in in
{ {
name = "amazon-cloudwatch-agent"; name = "amazon-cloudwatch-agent";
nodes.machine = nodes.machine =
@ -88,5 +87,4 @@ import ./make-test-python.nix (
machine.wait_for_file("/run/amazon-cloudwatch-agent/amazon-cloudwatch-agent.yaml") machine.wait_for_file("/run/amazon-cloudwatch-agent/amazon-cloudwatch-agent.yaml")
machine.wait_for_file("/run/amazon-cloudwatch-agent/env-config.json") machine.wait_for_file("/run/amazon-cloudwatch-agent/env-config.json")
''; '';
} }
)