forked from instana/go-sensor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaws_test.go
35 lines (28 loc) · 786 Bytes
/
aws_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// (c) Copyright IBM Corp. 2021
// (c) Copyright Instana Inc. 2020
package acceptor_test
import (
"testing"
"github.com/instana/go-sensor/acceptor"
"github.com/stretchr/testify/assert"
)
func TestNewECSTaskPluginPayload(t *testing.T) {
data := acceptor.ECSTaskData{
TaskARN: "arn::task",
}
assert.Equal(t, acceptor.PluginPayload{
Name: "com.instana.plugin.aws.ecs.task",
EntityID: "id1",
Data: data,
}, acceptor.NewECSTaskPluginPayload("id1", data))
}
func TestNewECSContainerPluginPayload(t *testing.T) {
data := acceptor.ECSContainerData{
DockerID: "docker1",
}
assert.Equal(t, acceptor.PluginPayload{
Name: "com.instana.plugin.aws.ecs.container",
EntityID: "id1",
Data: data,
}, acceptor.NewECSContainerPluginPayload("id1", data))
}