github.com/instana/go-sensor@v1.62.2-0.20240520081010-4919868049e1/acceptor/gcr_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 TestNewGCRServiceRevisionInstancePluginPayload(t *testing.T) {
    14  	data := acceptor.GCRServiceRevisionInstanceData{
    15  		Region:           "test-region",
    16  		Service:          "test-server",
    17  		Revision:         "test-revision",
    18  		InstanceID:       "test-instance",
    19  		NumericProjectID: 42,
    20  	}
    21  
    22  	assert.Equal(t, acceptor.PluginPayload{
    23  		Name:     "com.instana.plugin.gcp.run.revision.instance",
    24  		EntityID: "id1",
    25  		Data:     data,
    26  	}, acceptor.NewGCRServiceRevisionInstancePluginPayload("id1", data))
    27  }