fix tests

This commit is contained in:
Han Kang 2023-07-12 11:26:42 -07:00
parent aa788219f4
commit 9189c3d559
2 changed files with 3 additions and 3 deletions

View File

@ -433,7 +433,7 @@ func TestFeatureGateMetrics(t *testing.T) {
const testBetaDisabled Feature = "TestBetaDisabled"
testedMetrics := []string{"kubernetes_feature_enabled"}
expectedOutput := `
# HELP kubernetes_feature_enabled [ALPHA] This metric records the data about the stage and enablement of a k8s feature.
# HELP kubernetes_feature_enabled [BETA] This metric records the data about the stage and enablement of a k8s feature.
# TYPE kubernetes_feature_enabled gauge
kubernetes_feature_enabled{name="TestAlpha",stage="ALPHA"} 0
kubernetes_feature_enabled{name="TestBeta",stage="BETA"} 1

View File

@ -46,7 +46,7 @@ func TestObserveHealthcheck(t *testing.T) {
stage: "ALPHA",
enabled: true,
want: `
# HELP kubernetes_feature_enabled [ALPHA] This metric records the data about the stage and enablement of a k8s feature.
# HELP kubernetes_feature_enabled [BETA] This metric records the data about the stage and enablement of a k8s feature.
# TYPE kubernetes_feature_enabled gauge
kubernetes_feature_enabled{name="feature-a",stage="ALPHA"} 1
`,
@ -57,7 +57,7 @@ func TestObserveHealthcheck(t *testing.T) {
stage: "BETA",
enabled: false,
want: `
# HELP kubernetes_feature_enabled [ALPHA] This metric records the data about the stage and enablement of a k8s feature.
# HELP kubernetes_feature_enabled [BETA] This metric records the data about the stage and enablement of a k8s feature.
# TYPE kubernetes_feature_enabled gauge
kubernetes_feature_enabled{name="feature-b",stage="BETA"} 0
`,