mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 11:38:15 +00:00
fix tests
This commit is contained in:
parent
44f1c4dd94
commit
d68f5f0d92
@ -601,7 +601,7 @@ var _ = metrics.NewCounter(
|
|||||||
`},
|
`},
|
||||||
{
|
{
|
||||||
testName: "Fail on metric with stability set to function return",
|
testName: "Fail on metric with stability set to function return",
|
||||||
err: fmt.Errorf("testdata/metric.go:9:20: StabilityLevel should be passed STABLE, ALPHA or removed"),
|
err: fmt.Errorf("testdata/metric.go:9:20: %s", errStabilityLevel),
|
||||||
src: `
|
src: `
|
||||||
package test
|
package test
|
||||||
import "k8s.io/component-base/metrics"
|
import "k8s.io/component-base/metrics"
|
||||||
@ -616,7 +616,7 @@ var _ = metrics.NewCounter(
|
|||||||
`},
|
`},
|
||||||
{
|
{
|
||||||
testName: "error for passing stability as string",
|
testName: "error for passing stability as string",
|
||||||
err: fmt.Errorf("testdata/metric.go:6:20: StabilityLevel should be passed STABLE, ALPHA or removed"),
|
err: fmt.Errorf("testdata/metric.go:6:20: %s", errStabilityLevel),
|
||||||
src: `
|
src: `
|
||||||
package test
|
package test
|
||||||
import "k8s.io/component-base/metrics"
|
import "k8s.io/component-base/metrics"
|
||||||
@ -628,7 +628,7 @@ var _ = metrics.NewCounter(
|
|||||||
`},
|
`},
|
||||||
{
|
{
|
||||||
testName: "error for passing stability as variable",
|
testName: "error for passing stability as variable",
|
||||||
err: fmt.Errorf("testdata/metric.go:7:20: StabilityLevel should be passed STABLE, ALPHA or removed"),
|
err: fmt.Errorf("testdata/metric.go:7:20: %s", errStabilityLevel),
|
||||||
src: `
|
src: `
|
||||||
package test
|
package test
|
||||||
import "k8s.io/component-base/metrics"
|
import "k8s.io/component-base/metrics"
|
||||||
|
Loading…
Reference in New Issue
Block a user