Skip to content

detectors/aws/ecs tests are failing locally #7500

Open
@pellared

Description

@pellared

Description

detectors/aws/ecs tests are failing locally

Environment

  • OS: Ubuntu

Steps To Reproduce

make test-default

Actual behavior

ok      go.opentelemetry.io/contrib/detectors/aws/ecs   1.015s
--- FAIL: TestDetectV4LaunchTypeEc2 (0.01s)
    ecs_test.go:83: 
                Error Trace:    /home/ropajak/repos/opentelemetry-go-contrib/detectors/aws/ecs/test/ecs_test.go:83
                Error:          Not equal: 
                                expected: &resource.Resource{attrs:attribute.Set{equivalent:attribute.Distinct{iface:[18]attribute.KeyValue{attribute.KeyValue{Key:"aws.ecs.cluster.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:cluster/default", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.container.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.launchtype", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ec2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:task/default/158d1c8083dd49d6b527399fd6414f5c", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.family", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"curltest", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.revision", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"26", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.log.group.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:*"}}}, attribute.KeyValue{Key:"aws.log.group.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"/ecs/metadata"}}}, attribute.KeyValue{Key:"aws.log.stream.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:log-stream:ecs/curl/8f03e41243824aea923aca126495f665"}}}, attribute.KeyValue{Key:"aws.log.stream.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"ecs/curl/8f03e41243824aea923aca126495f665"}}}, attribute.KeyValue{Key:"cloud.account.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"111122223333", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.availability_zone", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2d", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.platform", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws_ecs", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.provider", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.region", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.resource_id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.name", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ropajak-l-pw0c1e3r", slice:interface {}(nil)}}}}}, schemaURL:"https://opentelemetry.io/schemas/1.34.0"}
                                actual  : &resource.Resource{attrs:attribute.Set{equivalent:attribute.Distinct{iface:[18]attribute.KeyValue{attribute.KeyValue{Key:"aws.ecs.cluster.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:cluster/default", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.container.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.launchtype", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ec2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:task/default/158d1c8083dd49d6b527399fd6414f5c", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.family", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"curltest", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.revision", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"26", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.log.group.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:*"}}}, attribute.KeyValue{Key:"aws.log.group.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"/ecs/metadata"}}}, attribute.KeyValue{Key:"aws.log.stream.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:log-stream:ecs/curl/8f03e41243824aea923aca126495f665"}}}, attribute.KeyValue{Key:"aws.log.stream.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"ecs/curl/8f03e41243824aea923aca126495f665"}}}, attribute.KeyValue{Key:"cloud.account.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"111122223333", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.availability_zone", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2d", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.platform", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws_ecs", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.provider", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.region", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.resource_id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"00.slice/user@1000.service/app.slice/app-gnome-code-173588.scope", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.name", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ropajak-l-pw0c1e3r", slice:interface {}(nil)}}}}}, schemaURL:"https://opentelemetry.io/schemas/1.34.0"}
                            
                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -161,3 +161,3 @@
                                       numeric: (uint64) 0,
                                -      stringly: (string) "",
                                +      stringly: (string) (len=64) "00.slice/user@1000.service/app.slice/app-gnome-code-173588.scope",
                                       slice: (interface {}) <nil>
                Test:           TestDetectV4LaunchTypeEc2
                Messages:       Resource returned is incorrect
--- FAIL: TestDetectV4LaunchTypeEc2BadContainerArn (0.01s)
    ecs_test.go:143: 
                Error Trace:    /home/ropajak/repos/opentelemetry-go-contrib/detectors/aws/ecs/test/ecs_test.go:143
                Error:          Not equal: 
                                expected: &resource.Resource{attrs:attribute.Set{equivalent:attribute.Distinct{iface:[18]attribute.KeyValue{attribute.KeyValue{Key:"aws.ecs.cluster.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:cluster/default", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.container.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.launchtype", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ec2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:task/default/158d1c8083dd49d6b527399fd6414f5c", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.family", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"curltest", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.revision", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"26", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.log.group.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:*"}}}, attribute.KeyValue{Key:"aws.log.group.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"/ecs/metadata"}}}, attribute.KeyValue{Key:"aws.log.stream.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:log-stream:ecs/curl/8f03e41243824aea923aca126495f665"}}}, attribute.KeyValue{Key:"aws.log.stream.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"ecs/curl/8f03e41243824aea923aca126495f665"}}}, attribute.KeyValue{Key:"cloud.account.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"111122223333", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.availability_zone", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2d", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.platform", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws_ecs", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.provider", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.region", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.resource_id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.name", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ropajak-l-pw0c1e3r", slice:interface {}(nil)}}}}}, schemaURL:"https://opentelemetry.io/schemas/1.34.0"}
                                actual  : &resource.Resource{attrs:attribute.Set{equivalent:attribute.Distinct{iface:[18]attribute.KeyValue{attribute.KeyValue{Key:"aws.ecs.cluster.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:cluster/default", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.container.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.launchtype", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ec2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:task/default/158d1c8083dd49d6b527399fd6414f5c", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.family", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"curltest", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.revision", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"26", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.log.group.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:*"}}}, attribute.KeyValue{Key:"aws.log.group.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"/ecs/metadata"}}}, attribute.KeyValue{Key:"aws.log.stream.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:log-stream:ecs/curl/8f03e41243824aea923aca126495f665"}}}, attribute.KeyValue{Key:"aws.log.stream.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"ecs/curl/8f03e41243824aea923aca126495f665"}}}, attribute.KeyValue{Key:"cloud.account.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"111122223333", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.availability_zone", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2d", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.platform", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws_ecs", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.provider", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.region", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.resource_id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"00.slice/user@1000.service/app.slice/app-gnome-code-173588.scope", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.name", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ropajak-l-pw0c1e3r", slice:interface {}(nil)}}}}}, schemaURL:"https://opentelemetry.io/schemas/1.34.0"}
                            
                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -161,3 +161,3 @@
                                       numeric: (uint64) 0,
                                -      stringly: (string) "",
                                +      stringly: (string) (len=64) "00.slice/user@1000.service/app.slice/app-gnome-code-173588.scope",
                                       slice: (interface {}) <nil>
                Test:           TestDetectV4LaunchTypeEc2BadContainerArn
                Messages:       Resource returned is incorrect
--- FAIL: TestDetectV4LaunchTypeEc2BadTaskArn (0.01s)
    ecs_test.go:203: 
                Error Trace:    /home/ropajak/repos/opentelemetry-go-contrib/detectors/aws/ecs/test/ecs_test.go:203
                Error:          Not equal: 
                                expected: &resource.Resource{attrs:attribute.Set{equivalent:attribute.Distinct{iface:[18]attribute.KeyValue{attribute.KeyValue{Key:"aws.ecs.cluster.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:cluster/default", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.container.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.launchtype", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ec2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:task/default/158d1c8083dd49d6b527399fd6414f5c", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.family", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"curltest", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.revision", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"26", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.log.group.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:*"}}}, attribute.KeyValue{Key:"aws.log.group.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"/ecs/metadata"}}}, attribute.KeyValue{Key:"aws.log.stream.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:log-stream:ecs/curl/8f03e41243824aea923aca126495f665"}}}, attribute.KeyValue{Key:"aws.log.stream.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"ecs/curl/8f03e41243824aea923aca126495f665"}}}, attribute.KeyValue{Key:"cloud.account.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"111122223333", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.availability_zone", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2d", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.platform", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws_ecs", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.provider", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.region", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.resource_id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.name", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ropajak-l-pw0c1e3r", slice:interface {}(nil)}}}}}, schemaURL:"https://opentelemetry.io/schemas/1.34.0"}
                                actual  : &resource.Resource{attrs:attribute.Set{equivalent:attribute.Distinct{iface:[18]attribute.KeyValue{attribute.KeyValue{Key:"aws.ecs.cluster.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:cluster/default", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.container.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.launchtype", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ec2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:task/default/158d1c8083dd49d6b527399fd6414f5c", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.family", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"curltest", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.revision", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"26", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.log.group.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:*"}}}, attribute.KeyValue{Key:"aws.log.group.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"/ecs/metadata"}}}, attribute.KeyValue{Key:"aws.log.stream.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/metadata:log-stream:ecs/curl/8f03e41243824aea923aca126495f665"}}}, attribute.KeyValue{Key:"aws.log.stream.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"ecs/curl/8f03e41243824aea923aca126495f665"}}}, attribute.KeyValue{Key:"cloud.account.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"111122223333", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.availability_zone", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2d", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.platform", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws_ecs", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.provider", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.region", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.resource_id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/0206b271-b33f-47ab-86c6-a0ba208a70a9", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"00.slice/user@1000.service/app.slice/app-gnome-code-173588.scope", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.name", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ropajak-l-pw0c1e3r", slice:interface {}(nil)}}}}}, schemaURL:"https://opentelemetry.io/schemas/1.34.0"}
                            
                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -161,3 +161,3 @@
                                       numeric: (uint64) 0,
                                -      stringly: (string) "",
                                +      stringly: (string) (len=64) "00.slice/user@1000.service/app.slice/app-gnome-code-173588.scope",
                                       slice: (interface {}) <nil>
                Test:           TestDetectV4LaunchTypeEc2BadTaskArn
                Messages:       Resource returned is incorrect
--- FAIL: TestDetectV4LaunchTypeFargate (0.01s)
    ecs_test.go:263: 
                Error Trace:    /home/ropajak/repos/opentelemetry-go-contrib/detectors/aws/ecs/test/ecs_test.go:263
                Error:          Not equal: 
                                expected: &resource.Resource{attrs:attribute.Set{equivalent:attribute.Distinct{iface:[18]attribute.KeyValue{attribute.KeyValue{Key:"aws.ecs.cluster.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:cluster/default", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.container.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/05966557-f16c-49cb-9352-24b3a0dcd0e1", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.launchtype", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"fargate", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:task/default/e9028f8d5d8e4f258373e7b93ce9a3c3", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.family", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"curltest", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.revision", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"3", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.log.group.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/containerlogs:*"}}}, attribute.KeyValue{Key:"aws.log.group.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"/ecs/containerlogs"}}}, attribute.KeyValue{Key:"aws.log.stream.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/containerlogs:log-stream:ecs/curl/cd189a933e5849daa93386466019ab50"}}}, attribute.KeyValue{Key:"aws.log.stream.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"ecs/curl/cd189a933e5849daa93386466019ab50"}}}, attribute.KeyValue{Key:"cloud.account.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"111122223333", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.availability_zone", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2a", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.platform", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws_ecs", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.provider", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.region", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.resource_id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/05966557-f16c-49cb-9352-24b3a0dcd0e1", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.name", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ropajak-l-pw0c1e3r", slice:interface {}(nil)}}}}}, schemaURL:"https://opentelemetry.io/schemas/1.34.0"}
                                actual  : &resource.Resource{attrs:attribute.Set{equivalent:attribute.Distinct{iface:[18]attribute.KeyValue{attribute.KeyValue{Key:"aws.ecs.cluster.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:cluster/default", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.container.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/05966557-f16c-49cb-9352-24b3a0dcd0e1", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.launchtype", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"fargate", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.arn", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:task/default/e9028f8d5d8e4f258373e7b93ce9a3c3", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.family", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"curltest", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.ecs.task.revision", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"3", slice:interface {}(nil)}}, attribute.KeyValue{Key:"aws.log.group.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/containerlogs:*"}}}, attribute.KeyValue{Key:"aws.log.group.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"/ecs/containerlogs"}}}, attribute.KeyValue{Key:"aws.log.stream.arns", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"arn:aws:logs:us-west-2:111122223333:log-group:/ecs/containerlogs:log-stream:ecs/curl/cd189a933e5849daa93386466019ab50"}}}, attribute.KeyValue{Key:"aws.log.stream.names", Value:attribute.Value{vtype:8, numeric:0x0, stringly:"", slice:[1]string{"ecs/curl/cd189a933e5849daa93386466019ab50"}}}, attribute.KeyValue{Key:"cloud.account.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"111122223333", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.availability_zone", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2a", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.platform", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws_ecs", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.provider", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"aws", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.region", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"us-west-2", slice:interface {}(nil)}}, attribute.KeyValue{Key:"cloud.resource_id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"arn:aws:ecs:us-west-2:111122223333:container/05966557-f16c-49cb-9352-24b3a0dcd0e1", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.id", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"00.slice/user@1000.service/app.slice/app-gnome-code-173588.scope", slice:interface {}(nil)}}, attribute.KeyValue{Key:"container.name", Value:attribute.Value{vtype:4, numeric:0x0, stringly:"ropajak-l-pw0c1e3r", slice:interface {}(nil)}}}}}, schemaURL:"https://opentelemetry.io/schemas/1.34.0"}
                            
                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -161,3 +161,3 @@
                                       numeric: (uint64) 0,
                                -      stringly: (string) "",
                                +      stringly: (string) (len=64) "00.slice/user@1000.service/app.slice/app-gnome-code-173588.scope",
                                       slice: (interface {}) <nil>
                Test:           TestDetectV4LaunchTypeFargate
                Messages:       Resource returned is incorrect
FAIL
FAIL    go.opentelemetry.io/contrib/detectors/aws/ecs/test      0.043s

Expected behavior

The test passes locally

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions