Skip to content

Commit 2ad528f

Browse files
authored
Add e2e test for VPA metrics from KSM check (#31872)
1 parent 381a3cb commit 2ad528f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/new-e2e/tests/containers/k8s_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,24 @@ func (suite *k8sSuite) TestCPU() {
801801
})
802802
}
803803

804+
func (suite *k8sSuite) TestKSM() {
805+
suite.testMetric(&testMetricArgs{
806+
Filter: testMetricFilterArgs{
807+
Name: "kubernetes_state.vpa.count",
808+
},
809+
Expect: testMetricExpectArgs{
810+
Tags: &[]string{
811+
`^kube_cluster_name:` + regexp.QuoteMeta(suite.clusterName) + `$`,
812+
`^kube_namespace:workload-(?:nginx|redis)$`,
813+
},
814+
Value: &testMetricExpectValueArgs{
815+
Max: 1,
816+
Min: 1,
817+
},
818+
},
819+
})
820+
}
821+
804822
func (suite *k8sSuite) TestDogstatsdInAgent() {
805823
// Test with UDS
806824
suite.testDogstatsd(kubeNamespaceDogstatsWorkload, kubeDeploymentDogstatsdUDS)

0 commit comments

Comments
 (0)