github.com/instana/go-sensor@v1.62.2-0.20240520081010-4919868049e1/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/go-sensor/acceptor"
    10  	"github.com/stretchr/testify/assert"
    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  }