Skip to content

Commit

Permalink
Fixed test format and added new test case for kubernetes too.
Browse files Browse the repository at this point in the history
  • Loading branch information
musa-asad committed Apr 24, 2024
1 parent e10ead2 commit c67569a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions translator/translate/otel/pipeline/appsignals/translator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,28 @@ func TestTranslatorMetricsForKubernetes(t *testing.T) {
detector: eksdetector.TestEKSDetector,
isEKSCache: eksdetector.TestIsEKSCacheEKS,
},
"WithAppSignalsAndLoggingEnabled": {
input: map[string]interface{}{
"agent": map[string]interface{}{
"debug": true,
},
"logs": map[string]interface{}{
"metrics_collected": map[string]interface{}{
"app_signals": map[string]interface{}{
"enabled": true,
},
},
},
},
want: &want{
receivers: []string{"otlp/app_signals"},
processors: []string{"resourcedetection", "awsappsignals"},
exporters: []string{"logging", "awsemf/app_signals"},
extensions: []string{"agenthealth/logs"},
},
detector: eksdetector.TestEKSDetector,
isEKSCache: eksdetector.TestIsEKSCacheEKS,
},
"WithAppSignalsEnabledK8s": {
input: map[string]interface{}{
"logs": map[string]interface{}{
Expand Down Expand Up @@ -226,6 +248,8 @@ func TestTranslatorMetricsForEC2(t *testing.T) {
exporters: []string{"logging", "awsemf/app_signals"},
extensions: []string{"agenthealth/logs"},
},
detector: eksdetector.TestEKSDetector,
isEKSCache: eksdetector.TestIsEKSCacheEKS,
},
}
for name, testCase := range testCases {
Expand Down

0 comments on commit c67569a

Please sign in to comment.