Skip to content

Commit 25d547c

Browse files
authored
Fixing integration tests for EKS add-on with the change to separate Container Insights and AppSignals resources in Windows (#226)
1 parent 85387a1 commit 25d547c

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

integration-tests/eks/resourceCount_linuxonly_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ package eks_addon
99
const (
1010
// Services count for CW agent on Linux and Windows
1111
serviceCountLinux = 6
12-
serviceCountWindows = 3
12+
serviceCountWindows = 6
1313

1414
// DaemonSet count for CW agent on Linux and Windows
1515
daemonsetCountLinux = 4
16-
daemonsetCountWindows = 2
16+
daemonsetCountWindows = 3
1717

1818
// Pods count for CW agent on Linux and Windows
1919
podCountLinux = 3

integration-tests/eks/resourceCount_windowslinux_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ package eks_addon
99
const (
1010
// Services count for CW agent on Linux and Windows
1111
serviceCountLinux = 6
12-
serviceCountWindows = 3
12+
serviceCountWindows = 6
1313

1414
// DaemonSet count for CW agent on Linux and Windows
1515
daemonsetCountLinux = 4
16-
daemonsetCountWindows = 2
16+
daemonsetCountWindows = 3
1717

1818
// Pods count for CW agent on Linux and Windows
1919
podCountLinux = 3

integration-tests/eks/validateResources_test.go

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,18 @@ import (
2626
)
2727

2828
const (
29-
nameSpace = "amazon-cloudwatch"
30-
addOnName = "amazon-cloudwatch-observability"
31-
agentName = "cloudwatch-agent"
32-
agentNameWindows = "cloudwatch-agent-windows"
33-
operatorName = addOnName + "-controller-manager"
34-
fluentBitName = "fluent-bit"
35-
fluentBitNameWindows = "fluent-bit-windows"
36-
dcgmExporterName = "dcgm-exporter"
37-
neuronMonitor = "neuron-monitor"
38-
podNameRegex = "(" + agentName + "|" + agentNameWindows + "|" + operatorName + "|" + fluentBitName + "|" + fluentBitNameWindows + ")-*"
39-
serviceNameRegex = agentName + "(-headless|-monitoring)?|" + agentNameWindows + "(-headless|-monitoring)?|" + addOnName + "-webhook-service|" + dcgmExporterName + "-service|" + neuronMonitor + "-service"
29+
nameSpace = "amazon-cloudwatch"
30+
addOnName = "amazon-cloudwatch-observability"
31+
agentName = "cloudwatch-agent"
32+
agentNameWindows = "cloudwatch-agent-windows"
33+
agentNameWindowsContainerInsights = "cloudwatch-agent-windows-container-insights"
34+
operatorName = addOnName + "-controller-manager"
35+
fluentBitName = "fluent-bit"
36+
fluentBitNameWindows = "fluent-bit-windows"
37+
dcgmExporterName = "dcgm-exporter"
38+
neuronMonitor = "neuron-monitor"
39+
podNameRegex = "(" + agentName + "|" + agentNameWindows + "|" + agentNameWindowsContainerInsights + "|" + operatorName + "|" + fluentBitName + "|" + fluentBitNameWindows + ")-*"
40+
serviceNameRegex = agentName + "(-headless|-monitoring)?|" + agentNameWindows + "(-headless|-monitoring)?|" + agentNameWindowsContainerInsights + "(-headless|-monitoring)?|" + addOnName + "-webhook-service|" + dcgmExporterName + "-service|" + neuronMonitor + "-service"
4041
)
4142

4243
const (
@@ -102,6 +103,9 @@ func TestOperatorOnEKs(t *testing.T) {
102103
// - cloudwatch-agent-windows
103104
// - cloudwatch-agent-windows-headless
104105
// - cloudwatch-agent-windows-monitoring
106+
// - cloudwatch-agent-windows-container-insights
107+
// - cloudwatch-agent-windows-container-insights-headless
108+
// - cloudwatch-agent-windows-container-insights-monitoring
105109
// - dcgm-exporter-service
106110
// - neuron-monitor-service
107111
if match, _ := regexp.MatchString(serviceNameRegex, service.Name); !match {
@@ -133,6 +137,7 @@ func TestOperatorOnEKs(t *testing.T) {
133137
// matches
134138
// - cloudwatch-agent
135139
// - cloudwatch-agent-windows
140+
// - cloudwatch-agent-windows-container-insights
136141
// - fluent-bit
137142
// - fluent-bit-windows
138143
// - dcgm-exporter (this can be removed in the future)

0 commit comments

Comments
 (0)