Skip to content

Commit

Permalink
Fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
bjrara committed Sep 5, 2024
1 parent 0ca2ab3 commit b732753
Showing 1 changed file with 50 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,55 @@ func TestTranslate(t *testing.T) {
"ec2": map[string]interface{}{
"tags": []interface{}{"^kubernetes.io/cluster/.*$", "^aws:autoscaling:groupName"},
},
"ecs": map[string]interface{}{
"resource_attributes": map[string]interface{}{
"aws.ecs.cluster.arn": map[string]interface{}{
"enabled": true,
},
"aws.ecs.launchtype": map[string]interface{}{
"enabled": true,
},
"aws.ecs.task.arn": map[string]interface{}{
"enabled": false,
},
"aws.ecs.task.family": map[string]interface{}{
"enabled": false,
},
"aws.ecs.task.id": map[string]interface{}{
"enabled": false,
},
"aws.ecs.task.revision": map[string]interface{}{
"enabled": false,
},
"aws.log.group.arns": map[string]interface{}{
"enabled": false,
},
"aws.log.group.names": map[string]interface{}{
"enabled": false,
},
"aws.log.stream.arns": map[string]interface{}{
"enabled": false,
},
"aws.log.stream.names": map[string]interface{}{
"enabled": false,
},
"cloud.account.id": map[string]interface{}{
"enabled": true,
},
"cloud.availability_zone": map[string]interface{}{
"enabled": true,
},
"cloud.platform": map[string]interface{}{
"enabled": true,
},
"cloud.provider": map[string]interface{}{
"enabled": true,
},
"cloud.region": map[string]interface{}{
"enabled": true,
},
},
},
}),
},
}
Expand All @@ -53,7 +102,7 @@ func TestTranslate(t *testing.T) {
gotCfg, ok := got.(*resourcedetectionprocessor.Config)
require.True(t, ok)
wantCfg := factory.CreateDefaultConfig()
require.NoError(t, testCase.want.Unmarshal(wantCfg))
require.NoError(t, testCase.want.Unmarshal(&wantCfg))
assert.Equal(t, wantCfg, gotCfg)
}
})
Expand Down

0 comments on commit b732753

Please sign in to comment.