From 17da70f6350355254463ac2bed5a913a25a6d889 Mon Sep 17 00:00:00 2001 From: Dewald de Jager Date: Fri, 2 Jun 2023 12:33:24 +0200 Subject: [PATCH] Fix the tests after updating the example metadata file --- .../internal/metadata/generated_status.go | 4 +++- cmd/mdatagen/loader_test.go | 16 ++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/cmd/mdatagen/internal/metadata/generated_status.go b/cmd/mdatagen/internal/metadata/generated_status.go index 4d81725d0f92..d01939e96a40 100644 --- a/cmd/mdatagen/internal/metadata/generated_status.go +++ b/cmd/mdatagen/internal/metadata/generated_status.go @@ -8,5 +8,7 @@ import ( const ( Type = "test" - MetricsStability = component.StabilityLevelDevelopment + TracesStability = component.StabilityLevelBeta + LogsStability = component.StabilityLevelDevelopment + MetricsStability = component.StabilityLevelStable ) diff --git a/cmd/mdatagen/loader_test.go b/cmd/mdatagen/loader_test.go index 247259bf7b60..659b65489ecd 100644 --- a/cmd/mdatagen/loader_test.go +++ b/cmd/mdatagen/loader_test.go @@ -22,6 +22,16 @@ func Test_loadMetadata(t *testing.T) { want: metadata{ Type: "test", SemConvVersion: "1.9.0", + Status: &Status{ + Class: "receiver", + Stability: map[string][]string{ + "development": {"logs"}, + "beta": {"traces"}, + "stable": {"metrics"}, + }, + Distributions: []string{"contrib"}, + Warnings: []string{"Any additional information that should be brought to the consumer's attention"}, + }, ResourceAttributes: map[attributeName]attribute{ "string.resource.attr": { Description: "Resource attribute with any string value.", @@ -146,12 +156,6 @@ func Test_loadMetadata(t *testing.T) { }, }, ScopeName: "otelcol", - Status: &Status{ - Class: "receiver", - Stability: map[string][]string{ - "development": {"metrics"}, - }, - }, }, }, {