github.com/mier85/go-sensor@v1.30.1-0.20220920111756-9bf41b3bc7e0/acceptor/aws_test.go (about) 1 // (c) Copyright IBM Corp. 2021 2 // (c) Copyright Instana Inc. 2020 3 4 package acceptor_test 5 6 import ( 7 "testing" 8 9 "github.com/instana/testify/assert" 10 "github.com/mier85/go-sensor/acceptor" 11 ) 12 13 func TestNewECSTaskPluginPayload(t *testing.T) { 14 data := acceptor.ECSTaskData{ 15 TaskARN: "arn::task", 16 } 17 18 assert.Equal(t, acceptor.PluginPayload{ 19 Name: "com.instana.plugin.aws.ecs.task", 20 EntityID: "id1", 21 Data: data, 22 }, acceptor.NewECSTaskPluginPayload("id1", data)) 23 } 24 25 func TestNewECSContainerPluginPayload(t *testing.T) { 26 data := acceptor.ECSContainerData{ 27 DockerID: "docker1", 28 } 29 30 assert.Equal(t, acceptor.PluginPayload{ 31 Name: "com.instana.plugin.aws.ecs.container", 32 EntityID: "id1", 33 Data: data, 34 }, acceptor.NewECSContainerPluginPayload("id1", data)) 35 }