@@ -11,6 +11,7 @@ import (
1111 "testing"
1212
1313 "github.com/stretchr/testify/require"
14+ "go.opentelemetry.io/collector/component"
1415)
1516
1617func TestRunContents (t * testing.T ) {
@@ -129,7 +130,7 @@ func TestInlineReplace(t *testing.T) {
129130 outputFile string
130131 componentClass string
131132 warnings []string
132- stability map [string ][]string
133+ stability map [component. StabilityLevel ][]string
133134 distros []string
134135 codeowners * Codeowners
135136 }{
@@ -258,8 +259,11 @@ Some warning there.
258259Some info about a component
259260` ,
260261 outputFile : "readme_with_multiple_signals.md" ,
261- stability : map [string ][]string {"beta" : {"metrics" }, "alpha" : {"logs" }},
262- distros : []string {"contrib" },
262+ stability : map [component.StabilityLevel ][]string {
263+ component .StabilityLevelBeta : {"metrics" },
264+ component .StabilityLevelAlpha : {"logs" },
265+ },
266+ distros : []string {"contrib" },
263267 },
264268 {
265269 name : "readme with cmd class" ,
@@ -270,15 +274,18 @@ Some info about a component
270274
271275Some info about a component
272276` ,
273- outputFile : "readme_with_cmd_class.md" ,
274- stability : map [string ][]string {"beta" : {"metrics" }, "alpha" : {"logs" }},
277+ outputFile : "readme_with_cmd_class.md" ,
278+ stability : map [component.StabilityLevel ][]string {
279+ component .StabilityLevelBeta : {"metrics" },
280+ component .StabilityLevelAlpha : {"logs" },
281+ },
275282 componentClass : "cmd" ,
276283 distros : []string {},
277284 },
278285 }
279286 for _ , tt := range tests {
280287 t .Run (tt .name , func (t * testing.T ) {
281- stability := map [string ][]string {"beta" : {"metrics" }}
288+ stability := map [component. StabilityLevel ][]string {component . StabilityLevelBeta : {"metrics" }}
282289 if len (tt .stability ) > 0 {
283290 stability = tt .stability
284291 }
@@ -327,7 +334,9 @@ func TestGenerateStatusMetadata(t *testing.T) {
327334 md : metadata {
328335 Type : "foo" ,
329336 Status : & Status {
330- Stability : map [string ][]string {"beta" : {"metrics" }},
337+ Stability : map [component.StabilityLevel ][]string {
338+ component .StabilityLevelBeta : {"metrics" },
339+ },
331340 Distributions : []string {"contrib" },
332341 Class : "receiver" ,
333342 },
@@ -364,7 +373,9 @@ func Tracer(settings component.TelemetrySettings) trace.Tracer {
364373 md : metadata {
365374 Type : "foo" ,
366375 Status : & Status {
367- Stability : map [string ][]string {"alpha" : {"metrics" }},
376+ Stability : map [component.StabilityLevel ][]string {
377+ component .StabilityLevelAlpha : {"metrics" },
378+ },
368379 Distributions : []string {"contrib" },
369380 Class : "receiver" ,
370381 },
0 commit comments