-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add E2E tests for OTLPReceiver's ReceiveResourceSpansV2
- Loading branch information
Showing
2 changed files
with
204 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
test/new-e2e/tests/otel/otel-agent/receive_resource_spans_v2_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed | ||
// under the Apache License Version 2.0. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2016-present Datadog, Inc. | ||
|
||
package otelagent | ||
|
||
import ( | ||
"github.com/DataDog/datadog-agent/test/new-e2e/pkg/e2e" | ||
"github.com/DataDog/datadog-agent/test/new-e2e/pkg/environments" | ||
localkubernetes "github.com/DataDog/datadog-agent/test/new-e2e/pkg/environments/local/kubernetes" | ||
"github.com/DataDog/datadog-agent/test/new-e2e/tests/otel/utils" | ||
"github.com/DataDog/test-infra-definitions/components/datadog/kubernetesagentparams" | ||
"testing" | ||
) | ||
|
||
type otlpIngestTestSuiteWithSpanReceiverV2 struct { | ||
e2e.BaseSuite[environments.Kubernetes] | ||
} | ||
|
||
func TestOTLPIngestWithSpanReceiverV2(t *testing.T) { | ||
values := ` | ||
datadog: | ||
logs: | ||
containerCollectAll: false | ||
containerCollectUsingFiles: false | ||
agents: | ||
containers: | ||
otelAgent: | ||
env: | ||
- name: DD_APM_FEATURES | ||
value: 'enable_receive_resource_spans_v2' | ||
` | ||
t.Parallel() | ||
e2e.Run(t, &otlpIngestTestSuiteWithSpanReceiverV2{}, e2e.WithProvisioner(localkubernetes.Provisioner(localkubernetes.WithAgentOptions(kubernetesagentparams.WithoutDualShipping(), kubernetesagentparams.WithHelmValues(values), kubernetesagentparams.WithOTelAgent(), kubernetesagentparams.WithOTelConfig(minimalConfig))))) | ||
} | ||
|
||
var otlpIngestParams = utils.IAParams{ | ||
InfraAttributes: false, | ||
} | ||
|
||
func (s *otlpIngestTestSuiteWithSpanReceiverV2) SetupSuite() { | ||
s.BaseSuite.SetupSuite() | ||
utils.TestSpanReceiverV2(s) | ||
} | ||
|
||
func (s *otlpIngestTestSuiteWithSpanReceiverV2) TestTracesWithSpanReceiverV2() { | ||
utils.TestTracesWithSpanReceiverV2(s, otlpIngestParams) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters