From e984bd081a18e96d6e633057ad9f441d99041afa Mon Sep 17 00:00:00 2001 From: musa-asad Date: Mon, 2 Dec 2024 23:54:49 -0500 Subject: [PATCH 1/5] Fix for fluent-bit integration tests for Windows --- terraform/eks/daemon/fluent/windows/main.tf | 2 ++ terraform/eks/daemon/fluent/windows/providers.tf | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/terraform/eks/daemon/fluent/windows/main.tf b/terraform/eks/daemon/fluent/windows/main.tf index dde0d010c..f7b7858cd 100644 --- a/terraform/eks/daemon/fluent/windows/main.tf +++ b/terraform/eks/daemon/fluent/windows/main.tf @@ -320,6 +320,7 @@ resource "kubernetes_cluster_role_binding" "rolebinding" { } resource "kubernetes_config_map" "cwagentconfig" { + depends_on = [kubernetes_namespace.namespace] metadata { name = "cwagentconfig" namespace = "amazon-cloudwatch" @@ -525,6 +526,7 @@ resource "kubernetes_config_map" "cluster_info" { } resource "kubernetes_service_account" "fluentbit_service" { + depends_on = [kubernetes_namespace.namespace] metadata { name = "fluent-bit" namespace = "amazon-cloudwatch" diff --git a/terraform/eks/daemon/fluent/windows/providers.tf b/terraform/eks/daemon/fluent/windows/providers.tf index bf99b8f3d..133916dd0 100644 --- a/terraform/eks/daemon/fluent/windows/providers.tf +++ b/terraform/eks/daemon/fluent/windows/providers.tf @@ -9,9 +9,9 @@ provider "kubernetes" { exec { api_version = "client.authentication.k8s.io/v1beta1" command = "aws" - args = ["eks", "get-token", "--cluster-name", module.fluent_common.cluster_name] + args = ["eks", "get-token", "--cluster-name", aws_eks_cluster.cluster.name] } - host = module.fluent_common.cluster_endpoint - cluster_ca_certificate = base64decode(module.fluent_common.cluster_cert) - token = module.fluent_common.cluster_auth_token + host = aws_eks_cluster.cluster.endpoint + cluster_ca_certificate = base64decode(aws_eks_cluster.cluster.certificate_authority.0.data) + token = data.aws_eks_cluster_auth.cluster_auth.token } \ No newline at end of file From 36b869f92315209aece8bde61732d0fc6c9bb90a Mon Sep 17 00:00:00 2001 From: musa-asad Date: Tue, 3 Dec 2024 00:05:38 -0500 Subject: [PATCH 2/5] Skip other tests. --- generator/test_case_generator.go | 356 +++++++++++++++---------------- 1 file changed, 178 insertions(+), 178 deletions(-) diff --git a/generator/test_case_generator.go b/generator/test_case_generator.go index a811e7c5c..2ab0ce1f2 100644 --- a/generator/test_case_generator.go +++ b/generator/test_case_generator.go @@ -56,193 +56,193 @@ const ( // you can't have a const map in golang var testTypeToTestConfig = map[string][]testConfig{ - "ec2_gpu": { - {testDir: "./test/nvidia_gpu"}, - }, - testTypeKeyEc2Linux: { - {testDir: "./test/ca_bundle"}, - {testDir: "./test/cloudwatchlogs"}, - { - testDir: "./test/metrics_number_dimension", - targets: map[string]map[string]struct{}{"os": {"al2": {}}}, - }, - { - testDir: "./test/emf_concurrent", - targets: map[string]map[string]struct{}{"os": {"al2": {}}}, - maxAttempts: 1, - }, - {testDir: "./test/metric_value_benchmark"}, - {testDir: "./test/run_as_user"}, - {testDir: "./test/collection_interval"}, - {testDir: "./test/metric_dimension"}, - {testDir: "./test/restart"}, - {testDir: "./test/xray"}, - {testDir: "./test/otlp"}, - { - testDir: "./test/acceptance", - targets: map[string]map[string]struct{}{"os": {"ubuntu-20.04": {}}}, - }, - // skipping FIPS test as the test cannot be verified - // neither ssh nor SSM works after a reboot once FIPS is enabled + //"ec2_gpu": { + // {testDir: "./test/nvidia_gpu"}, + //}, + //testTypeKeyEc2Linux: { + // {testDir: "./test/ca_bundle"}, + // {testDir: "./test/cloudwatchlogs"}, + // { + // testDir: "./test/metrics_number_dimension", + // targets: map[string]map[string]struct{}{"os": {"al2": {}}}, + // }, + // { + // testDir: "./test/emf_concurrent", + // targets: map[string]map[string]struct{}{"os": {"al2": {}}}, + // maxAttempts: 1, + // }, + // {testDir: "./test/metric_value_benchmark"}, + // {testDir: "./test/run_as_user"}, + // {testDir: "./test/collection_interval"}, + // {testDir: "./test/metric_dimension"}, + // {testDir: "./test/restart"}, + // {testDir: "./test/xray"}, + // {testDir: "./test/otlp"}, + // { + // testDir: "./test/acceptance", + // targets: map[string]map[string]struct{}{"os": {"ubuntu-20.04": {}}}, + // }, + // // skipping FIPS test as the test cannot be verified + // // neither ssh nor SSM works after a reboot once FIPS is enabled + // //{ + // // testDir: "./test/fips", + // // targets: map[string]map[string]struct{}{"os": {"rhel8": {}}}, + // //}, + // { + // testDir: "./test/lvm", + // targets: map[string]map[string]struct{}{"os": {"al2": {}}}, + // }, + // { + // testDir: "./test/proxy", + // targets: map[string]map[string]struct{}{"os": {"al2": {}}}, + // }, + // { + // testDir: "./test/ssl_cert", + // targets: map[string]map[string]struct{}{"os": {"al2": {}}}, + // }, + // { + // testDir: "./test/userdata", + // terraformDir: "terraform/ec2/userdata", + // targets: map[string]map[string]struct{}{"os": {"ol9": {}}}, + // }, + // { + // testDir: "./test/assume_role", + // terraformDir: "terraform/ec2/creds", + // targets: map[string]map[string]struct{}{"os": {"al2": {}}}, + // }, + // { + // testDir: "./test/amp", + // targets: map[string]map[string]struct{}{"os": {"al2": {}}, "arc": {"amd64": {}}}, + // }, + // { + // testDir: "./test/agent_otel_merging", + // targets: map[string]map[string]struct{}{"os": {"al2": {}}, "arc": {"amd64": {}}}, + // }, + //}, + ///* + // You can only place 1 mac instance on a dedicate host a single time. + // Therefore, limit down the scope for testing in Mac since EC2 can be done with Linux + // and Mac under the hood share similar plugins with Linux + //*/ + //"ec2_mac": { + // {testDir: "../../../test/feature/mac"}, + //}, + //"ec2_windows": { + // {testDir: "../../../test/feature/windows"}, + // {testDir: "../../../test/restart"}, + // {testDir: "../../../test/acceptance"}, + // {testDir: "../../../test/feature/windows/event_logs"}, + // { + // testDir: "../../../test/feature/windows/custom_start/userdata", + // targets: map[string]map[string]struct{}{"os": {"win-2019": {}}}, + // }, + // { + // testDir: "../../../test/feature/windows/custom_start/ssm_start", + // targets: map[string]map[string]struct{}{"os": {"win-2019": {}}}, + // }, + // // assume role test doesn't add much value, and it already being tested with linux + // //{testDir: "../../../test/assume_role"}, + //}, + //"ec2_performance": { + // {testDir: "../../test/performance/emf"}, + // {testDir: "../../test/performance/logs"}, + // {testDir: "../../test/performance/system"}, + // {testDir: "../../test/performance/statsd"}, + // {testDir: "../../test/performance/collectd"}, + // {testDir: "../../test/performance/trace/xray", runMockServer: true}, + //}, + //"ec2_windows_performance": { + // {testDir: "../../test/performance/windows/logs"}, + // {testDir: "../../test/performance/windows/system"}, + //}, + //"ec2_stress": { + // {testDir: "../../test/stress/emf"}, + // {testDir: "../../test/stress/logs"}, + // {testDir: "../../test/stress/system"}, + // {testDir: "../../test/stress/statsd"}, + // {testDir: "../../test/stress/collectd"}, + //}, + //"ec2_windows_stress": { + // {testDir: "../../test/stress/windows/logs"}, + // {testDir: "../../test/stress/windows/system"}, + //}, + //"ecs_fargate": { + // {testDir: "./test/ecs/ecs_metadata"}, + //}, + //"ecs_ec2_daemon": { + // { + // testDir: "./test/metric_value_benchmark", + // targets: map[string]map[string]struct{}{"metadataEnabled": {"enabled": {}}}, + // }, + // { + // testDir: "./test/statsd", + // targets: map[string]map[string]struct{}{"metadataEnabled": {"enabled": {}}}, + // }, + // { + // testDir: "./test/emf", + // targets: map[string]map[string]struct{}{"metadataEnabled": {"disabled": {}}}, + // }, + // { + // testDir: "./test/emf", + // targets: map[string]map[string]struct{}{"metadataEnabled": {"enabled": {}}}, + // }, + //}, + //"eks_addon": { + // { + // testDir: "../../../../test/gpu", + // terraformDir: "terraform/eks/addon/gpu", + // }, + //}, + "eks_daemon": { //{ - // testDir: "./test/fips", - // targets: map[string]map[string]struct{}{"os": {"rhel8": {}}}, + // testDir: "./test/metric_value_benchmark", + // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + // instanceType: "g4dn.xlarge", + //}, + //{ + // testDir: "./test/metric_value_benchmark", + // terraformDir: "terraform/eks/daemon/windows/2019", + // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + //}, + //{ + // testDir: "./test/metric_value_benchmark", + // terraformDir: "terraform/eks/daemon/windows/2022", + // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + //}, + //{ + // testDir: "./test/statsd", terraformDir: "terraform/eks/daemon/statsd", + // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + //}, + //{ + // testDir: "./test/emf", terraformDir: "terraform/eks/daemon/emf", + // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, //}, - { - testDir: "./test/lvm", - targets: map[string]map[string]struct{}{"os": {"al2": {}}}, - }, - { - testDir: "./test/proxy", - targets: map[string]map[string]struct{}{"os": {"al2": {}}}, - }, - { - testDir: "./test/ssl_cert", - targets: map[string]map[string]struct{}{"os": {"al2": {}}}, - }, - { - testDir: "./test/userdata", - terraformDir: "terraform/ec2/userdata", - targets: map[string]map[string]struct{}{"os": {"ol9": {}}}, - }, - { - testDir: "./test/assume_role", - terraformDir: "terraform/ec2/creds", - targets: map[string]map[string]struct{}{"os": {"al2": {}}}, - }, - { - testDir: "./test/amp", - targets: map[string]map[string]struct{}{"os": {"al2": {}}, "arc": {"amd64": {}}}, - }, - { - testDir: "./test/agent_otel_merging", - targets: map[string]map[string]struct{}{"os": {"al2": {}}, "arc": {"amd64": {}}}, - }, - }, - /* - You can only place 1 mac instance on a dedicate host a single time. - Therefore, limit down the scope for testing in Mac since EC2 can be done with Linux - and Mac under the hood share similar plugins with Linux - */ - "ec2_mac": { - {testDir: "../../../test/feature/mac"}, - }, - "ec2_windows": { - {testDir: "../../../test/feature/windows"}, - {testDir: "../../../test/restart"}, - {testDir: "../../../test/acceptance"}, - {testDir: "../../../test/feature/windows/event_logs"}, - { - testDir: "../../../test/feature/windows/custom_start/userdata", - targets: map[string]map[string]struct{}{"os": {"win-2019": {}}}, - }, - { - testDir: "../../../test/feature/windows/custom_start/ssm_start", - targets: map[string]map[string]struct{}{"os": {"win-2019": {}}}, - }, - // assume role test doesn't add much value, and it already being tested with linux - //{testDir: "../../../test/assume_role"}, - }, - "ec2_performance": { - {testDir: "../../test/performance/emf"}, - {testDir: "../../test/performance/logs"}, - {testDir: "../../test/performance/system"}, - {testDir: "../../test/performance/statsd"}, - {testDir: "../../test/performance/collectd"}, - {testDir: "../../test/performance/trace/xray", runMockServer: true}, - }, - "ec2_windows_performance": { - {testDir: "../../test/performance/windows/logs"}, - {testDir: "../../test/performance/windows/system"}, - }, - "ec2_stress": { - {testDir: "../../test/stress/emf"}, - {testDir: "../../test/stress/logs"}, - {testDir: "../../test/stress/system"}, - {testDir: "../../test/stress/statsd"}, - {testDir: "../../test/stress/collectd"}, - }, - "ec2_windows_stress": { - {testDir: "../../test/stress/windows/logs"}, - {testDir: "../../test/stress/windows/system"}, - }, - "ecs_fargate": { - {testDir: "./test/ecs/ecs_metadata"}, - }, - "ecs_ec2_daemon": { - { - testDir: "./test/metric_value_benchmark", - targets: map[string]map[string]struct{}{"metadataEnabled": {"enabled": {}}}, - }, - { - testDir: "./test/statsd", - targets: map[string]map[string]struct{}{"metadataEnabled": {"enabled": {}}}, - }, - { - testDir: "./test/emf", - targets: map[string]map[string]struct{}{"metadataEnabled": {"disabled": {}}}, - }, - { - testDir: "./test/emf", - targets: map[string]map[string]struct{}{"metadataEnabled": {"enabled": {}}}, - }, - }, - "eks_addon": { - { - testDir: "../../../../test/gpu", - terraformDir: "terraform/eks/addon/gpu", - }, - }, - "eks_daemon": { - { - testDir: "./test/metric_value_benchmark", - targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - instanceType: "g4dn.xlarge", - }, - { - testDir: "./test/metric_value_benchmark", - terraformDir: "terraform/eks/daemon/windows/2019", - targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - }, - { - testDir: "./test/metric_value_benchmark", - terraformDir: "terraform/eks/daemon/windows/2022", - targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - }, - { - testDir: "./test/statsd", terraformDir: "terraform/eks/daemon/statsd", - targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - }, - { - testDir: "./test/emf", terraformDir: "terraform/eks/daemon/emf", - targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - }, { testDir: "./test/fluent", terraformDir: "terraform/eks/daemon/fluent/d", targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, }, {testDir: "./test/fluent", terraformDir: "terraform/eks/daemon/fluent/bit"}, {testDir: "./test/fluent", terraformDir: "terraform/eks/daemon/fluent/windows/2022"}, - { - testDir: "./test/gpu", terraformDir: "terraform/eks/daemon/gpu", - targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - }, - { - testDir: "./test/awsneuron", terraformDir: "terraform/eks/daemon/awsneuron", - targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - }, - { - testDir: "./test/entity", terraformDir: "terraform/eks/daemon/entity", - targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - }, - { - testDir: "./test/efa", terraformDir: "terraform/eks/daemon/efa", - targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - }, - }, - "eks_deployment": { - {testDir: "./test/metric_value_benchmark"}, + //{ + // testDir: "./test/gpu", terraformDir: "terraform/eks/daemon/gpu", + // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + //}, + //{ + // testDir: "./test/awsneuron", terraformDir: "terraform/eks/daemon/awsneuron", + // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + //}, + //{ + // testDir: "./test/entity", terraformDir: "terraform/eks/daemon/entity", + // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + //}, + //{ + // testDir: "./test/efa", terraformDir: "terraform/eks/daemon/efa", + // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + //}, }, + //"eks_deployment": { + // {testDir: "./test/metric_value_benchmark"}, + //}, } type partition struct { From 410288f8f6620484bc6d2b5b899c4aba6789de08 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Tue, 3 Dec 2024 14:31:37 -0500 Subject: [PATCH 3/5] Update test case generator to include windows target for windows fluent test. --- generator/test_case_generator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/test_case_generator.go b/generator/test_case_generator.go index 2ab0ce1f2..e2760d3a7 100644 --- a/generator/test_case_generator.go +++ b/generator/test_case_generator.go @@ -222,7 +222,7 @@ var testTypeToTestConfig = map[string][]testConfig{ targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, }, {testDir: "./test/fluent", terraformDir: "terraform/eks/daemon/fluent/bit"}, - {testDir: "./test/fluent", terraformDir: "terraform/eks/daemon/fluent/windows/2022"}, + {testDir: "./test/fluent", terraformDir: "terraform/eks/daemon/fluent/windows/2022", targets: map[string]map[string]struct{}{"os": {"win-2022": {}}}}, //{ // testDir: "./test/gpu", terraformDir: "terraform/eks/daemon/gpu", // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, From 7cf54615248730a81d4ed2c6a0b6d9c6bc23a2fd Mon Sep 17 00:00:00 2001 From: lisguo Date: Tue, 3 Dec 2024 15:25:46 -0500 Subject: [PATCH 4/5] Add retry logic to fluent test --- test/fluent/fluent_test.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/fluent/fluent_test.go b/test/fluent/fluent_test.go index 951a72ed8..c2074626f 100644 --- a/test/fluent/fluent_test.go +++ b/test/fluent/fluent_test.go @@ -17,7 +17,7 @@ import ( "github.com/aws/amazon-cloudwatch-agent-test/util/awsservice" ) -const logStreamRetry = 20 +const logStreamRetry = 10 // fluent log group with expected log message fields var logGroupToKey = map[string][][]string{ @@ -61,10 +61,19 @@ func TestFluentLogs(t *testing.T) { logGroupToKey = logGroupToKeyWindows } + currRetries := 0 now := time.Now() for group, fieldsArr := range logGroupToKey { group = fmt.Sprintf("/aws/containerinsights/%s/%s", env.EKSClusterName, group) - if !awsservice.IsLogGroupExists(group) { + for currRetries < logStreamRetry { + if awsservice.IsLogGroupExists(group) { + break + } else { + currRetries++ + time.Sleep(time.Duration(currRetries) * time.Second) + } + } + if currRetries >= logStreamRetry { t.Fatalf("fluent log group doesn't exsit: %s", group) } From 4bf50ae8858e38cfed88234f882c069ea9642644 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Tue, 3 Dec 2024 15:59:53 -0500 Subject: [PATCH 5/5] Revert test_case_generator.go. --- generator/test_case_generator.go | 358 +++++++++++++++---------------- 1 file changed, 179 insertions(+), 179 deletions(-) diff --git a/generator/test_case_generator.go b/generator/test_case_generator.go index e2760d3a7..a811e7c5c 100644 --- a/generator/test_case_generator.go +++ b/generator/test_case_generator.go @@ -56,193 +56,193 @@ const ( // you can't have a const map in golang var testTypeToTestConfig = map[string][]testConfig{ - //"ec2_gpu": { - // {testDir: "./test/nvidia_gpu"}, - //}, - //testTypeKeyEc2Linux: { - // {testDir: "./test/ca_bundle"}, - // {testDir: "./test/cloudwatchlogs"}, - // { - // testDir: "./test/metrics_number_dimension", - // targets: map[string]map[string]struct{}{"os": {"al2": {}}}, - // }, - // { - // testDir: "./test/emf_concurrent", - // targets: map[string]map[string]struct{}{"os": {"al2": {}}}, - // maxAttempts: 1, - // }, - // {testDir: "./test/metric_value_benchmark"}, - // {testDir: "./test/run_as_user"}, - // {testDir: "./test/collection_interval"}, - // {testDir: "./test/metric_dimension"}, - // {testDir: "./test/restart"}, - // {testDir: "./test/xray"}, - // {testDir: "./test/otlp"}, - // { - // testDir: "./test/acceptance", - // targets: map[string]map[string]struct{}{"os": {"ubuntu-20.04": {}}}, - // }, - // // skipping FIPS test as the test cannot be verified - // // neither ssh nor SSM works after a reboot once FIPS is enabled - // //{ - // // testDir: "./test/fips", - // // targets: map[string]map[string]struct{}{"os": {"rhel8": {}}}, - // //}, - // { - // testDir: "./test/lvm", - // targets: map[string]map[string]struct{}{"os": {"al2": {}}}, - // }, - // { - // testDir: "./test/proxy", - // targets: map[string]map[string]struct{}{"os": {"al2": {}}}, - // }, - // { - // testDir: "./test/ssl_cert", - // targets: map[string]map[string]struct{}{"os": {"al2": {}}}, - // }, - // { - // testDir: "./test/userdata", - // terraformDir: "terraform/ec2/userdata", - // targets: map[string]map[string]struct{}{"os": {"ol9": {}}}, - // }, - // { - // testDir: "./test/assume_role", - // terraformDir: "terraform/ec2/creds", - // targets: map[string]map[string]struct{}{"os": {"al2": {}}}, - // }, - // { - // testDir: "./test/amp", - // targets: map[string]map[string]struct{}{"os": {"al2": {}}, "arc": {"amd64": {}}}, - // }, - // { - // testDir: "./test/agent_otel_merging", - // targets: map[string]map[string]struct{}{"os": {"al2": {}}, "arc": {"amd64": {}}}, - // }, - //}, - ///* - // You can only place 1 mac instance on a dedicate host a single time. - // Therefore, limit down the scope for testing in Mac since EC2 can be done with Linux - // and Mac under the hood share similar plugins with Linux - //*/ - //"ec2_mac": { - // {testDir: "../../../test/feature/mac"}, - //}, - //"ec2_windows": { - // {testDir: "../../../test/feature/windows"}, - // {testDir: "../../../test/restart"}, - // {testDir: "../../../test/acceptance"}, - // {testDir: "../../../test/feature/windows/event_logs"}, - // { - // testDir: "../../../test/feature/windows/custom_start/userdata", - // targets: map[string]map[string]struct{}{"os": {"win-2019": {}}}, - // }, - // { - // testDir: "../../../test/feature/windows/custom_start/ssm_start", - // targets: map[string]map[string]struct{}{"os": {"win-2019": {}}}, - // }, - // // assume role test doesn't add much value, and it already being tested with linux - // //{testDir: "../../../test/assume_role"}, - //}, - //"ec2_performance": { - // {testDir: "../../test/performance/emf"}, - // {testDir: "../../test/performance/logs"}, - // {testDir: "../../test/performance/system"}, - // {testDir: "../../test/performance/statsd"}, - // {testDir: "../../test/performance/collectd"}, - // {testDir: "../../test/performance/trace/xray", runMockServer: true}, - //}, - //"ec2_windows_performance": { - // {testDir: "../../test/performance/windows/logs"}, - // {testDir: "../../test/performance/windows/system"}, - //}, - //"ec2_stress": { - // {testDir: "../../test/stress/emf"}, - // {testDir: "../../test/stress/logs"}, - // {testDir: "../../test/stress/system"}, - // {testDir: "../../test/stress/statsd"}, - // {testDir: "../../test/stress/collectd"}, - //}, - //"ec2_windows_stress": { - // {testDir: "../../test/stress/windows/logs"}, - // {testDir: "../../test/stress/windows/system"}, - //}, - //"ecs_fargate": { - // {testDir: "./test/ecs/ecs_metadata"}, - //}, - //"ecs_ec2_daemon": { - // { - // testDir: "./test/metric_value_benchmark", - // targets: map[string]map[string]struct{}{"metadataEnabled": {"enabled": {}}}, - // }, - // { - // testDir: "./test/statsd", - // targets: map[string]map[string]struct{}{"metadataEnabled": {"enabled": {}}}, - // }, - // { - // testDir: "./test/emf", - // targets: map[string]map[string]struct{}{"metadataEnabled": {"disabled": {}}}, - // }, - // { - // testDir: "./test/emf", - // targets: map[string]map[string]struct{}{"metadataEnabled": {"enabled": {}}}, - // }, - //}, - //"eks_addon": { - // { - // testDir: "../../../../test/gpu", - // terraformDir: "terraform/eks/addon/gpu", - // }, - //}, - "eks_daemon": { - //{ - // testDir: "./test/metric_value_benchmark", - // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - // instanceType: "g4dn.xlarge", - //}, - //{ - // testDir: "./test/metric_value_benchmark", - // terraformDir: "terraform/eks/daemon/windows/2019", - // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - //}, - //{ - // testDir: "./test/metric_value_benchmark", - // terraformDir: "terraform/eks/daemon/windows/2022", - // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - //}, - //{ - // testDir: "./test/statsd", terraformDir: "terraform/eks/daemon/statsd", - // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - //}, + "ec2_gpu": { + {testDir: "./test/nvidia_gpu"}, + }, + testTypeKeyEc2Linux: { + {testDir: "./test/ca_bundle"}, + {testDir: "./test/cloudwatchlogs"}, + { + testDir: "./test/metrics_number_dimension", + targets: map[string]map[string]struct{}{"os": {"al2": {}}}, + }, + { + testDir: "./test/emf_concurrent", + targets: map[string]map[string]struct{}{"os": {"al2": {}}}, + maxAttempts: 1, + }, + {testDir: "./test/metric_value_benchmark"}, + {testDir: "./test/run_as_user"}, + {testDir: "./test/collection_interval"}, + {testDir: "./test/metric_dimension"}, + {testDir: "./test/restart"}, + {testDir: "./test/xray"}, + {testDir: "./test/otlp"}, + { + testDir: "./test/acceptance", + targets: map[string]map[string]struct{}{"os": {"ubuntu-20.04": {}}}, + }, + // skipping FIPS test as the test cannot be verified + // neither ssh nor SSM works after a reboot once FIPS is enabled //{ - // testDir: "./test/emf", terraformDir: "terraform/eks/daemon/emf", - // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + // testDir: "./test/fips", + // targets: map[string]map[string]struct{}{"os": {"rhel8": {}}}, //}, + { + testDir: "./test/lvm", + targets: map[string]map[string]struct{}{"os": {"al2": {}}}, + }, + { + testDir: "./test/proxy", + targets: map[string]map[string]struct{}{"os": {"al2": {}}}, + }, + { + testDir: "./test/ssl_cert", + targets: map[string]map[string]struct{}{"os": {"al2": {}}}, + }, + { + testDir: "./test/userdata", + terraformDir: "terraform/ec2/userdata", + targets: map[string]map[string]struct{}{"os": {"ol9": {}}}, + }, + { + testDir: "./test/assume_role", + terraformDir: "terraform/ec2/creds", + targets: map[string]map[string]struct{}{"os": {"al2": {}}}, + }, + { + testDir: "./test/amp", + targets: map[string]map[string]struct{}{"os": {"al2": {}}, "arc": {"amd64": {}}}, + }, + { + testDir: "./test/agent_otel_merging", + targets: map[string]map[string]struct{}{"os": {"al2": {}}, "arc": {"amd64": {}}}, + }, + }, + /* + You can only place 1 mac instance on a dedicate host a single time. + Therefore, limit down the scope for testing in Mac since EC2 can be done with Linux + and Mac under the hood share similar plugins with Linux + */ + "ec2_mac": { + {testDir: "../../../test/feature/mac"}, + }, + "ec2_windows": { + {testDir: "../../../test/feature/windows"}, + {testDir: "../../../test/restart"}, + {testDir: "../../../test/acceptance"}, + {testDir: "../../../test/feature/windows/event_logs"}, + { + testDir: "../../../test/feature/windows/custom_start/userdata", + targets: map[string]map[string]struct{}{"os": {"win-2019": {}}}, + }, + { + testDir: "../../../test/feature/windows/custom_start/ssm_start", + targets: map[string]map[string]struct{}{"os": {"win-2019": {}}}, + }, + // assume role test doesn't add much value, and it already being tested with linux + //{testDir: "../../../test/assume_role"}, + }, + "ec2_performance": { + {testDir: "../../test/performance/emf"}, + {testDir: "../../test/performance/logs"}, + {testDir: "../../test/performance/system"}, + {testDir: "../../test/performance/statsd"}, + {testDir: "../../test/performance/collectd"}, + {testDir: "../../test/performance/trace/xray", runMockServer: true}, + }, + "ec2_windows_performance": { + {testDir: "../../test/performance/windows/logs"}, + {testDir: "../../test/performance/windows/system"}, + }, + "ec2_stress": { + {testDir: "../../test/stress/emf"}, + {testDir: "../../test/stress/logs"}, + {testDir: "../../test/stress/system"}, + {testDir: "../../test/stress/statsd"}, + {testDir: "../../test/stress/collectd"}, + }, + "ec2_windows_stress": { + {testDir: "../../test/stress/windows/logs"}, + {testDir: "../../test/stress/windows/system"}, + }, + "ecs_fargate": { + {testDir: "./test/ecs/ecs_metadata"}, + }, + "ecs_ec2_daemon": { + { + testDir: "./test/metric_value_benchmark", + targets: map[string]map[string]struct{}{"metadataEnabled": {"enabled": {}}}, + }, + { + testDir: "./test/statsd", + targets: map[string]map[string]struct{}{"metadataEnabled": {"enabled": {}}}, + }, + { + testDir: "./test/emf", + targets: map[string]map[string]struct{}{"metadataEnabled": {"disabled": {}}}, + }, + { + testDir: "./test/emf", + targets: map[string]map[string]struct{}{"metadataEnabled": {"enabled": {}}}, + }, + }, + "eks_addon": { + { + testDir: "../../../../test/gpu", + terraformDir: "terraform/eks/addon/gpu", + }, + }, + "eks_daemon": { + { + testDir: "./test/metric_value_benchmark", + targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + instanceType: "g4dn.xlarge", + }, + { + testDir: "./test/metric_value_benchmark", + terraformDir: "terraform/eks/daemon/windows/2019", + targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + }, + { + testDir: "./test/metric_value_benchmark", + terraformDir: "terraform/eks/daemon/windows/2022", + targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + }, + { + testDir: "./test/statsd", terraformDir: "terraform/eks/daemon/statsd", + targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + }, + { + testDir: "./test/emf", terraformDir: "terraform/eks/daemon/emf", + targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + }, { testDir: "./test/fluent", terraformDir: "terraform/eks/daemon/fluent/d", targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, }, {testDir: "./test/fluent", terraformDir: "terraform/eks/daemon/fluent/bit"}, - {testDir: "./test/fluent", terraformDir: "terraform/eks/daemon/fluent/windows/2022", targets: map[string]map[string]struct{}{"os": {"win-2022": {}}}}, - //{ - // testDir: "./test/gpu", terraformDir: "terraform/eks/daemon/gpu", - // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - //}, - //{ - // testDir: "./test/awsneuron", terraformDir: "terraform/eks/daemon/awsneuron", - // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - //}, - //{ - // testDir: "./test/entity", terraformDir: "terraform/eks/daemon/entity", - // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - //}, - //{ - // testDir: "./test/efa", terraformDir: "terraform/eks/daemon/efa", - // targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, - //}, + {testDir: "./test/fluent", terraformDir: "terraform/eks/daemon/fluent/windows/2022"}, + { + testDir: "./test/gpu", terraformDir: "terraform/eks/daemon/gpu", + targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + }, + { + testDir: "./test/awsneuron", terraformDir: "terraform/eks/daemon/awsneuron", + targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + }, + { + testDir: "./test/entity", terraformDir: "terraform/eks/daemon/entity", + targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + }, + { + testDir: "./test/efa", terraformDir: "terraform/eks/daemon/efa", + targets: map[string]map[string]struct{}{"arc": {"amd64": {}}}, + }, + }, + "eks_deployment": { + {testDir: "./test/metric_value_benchmark"}, }, - //"eks_deployment": { - // {testDir: "./test/metric_value_benchmark"}, - //}, } type partition struct {