relax matcher for ResourceMetricsAPI test

Instead of requiring only exactly the pods created, allow other pods
to exist by ignoring any extra matches.
This commit is contained in:
Morgan Bauer 2020-08-31 09:53:33 -07:00
parent c631e78173
commit 8936adc146
No known key found for this signature in database
GPG Key ID: E825BB6045011EF1

View File

@ -83,7 +83,7 @@ var _ = framework.KubeDescribe("ResourceMetricsAPI [NodeFeature:ResourceMetrics]
fmt.Sprintf("%s::%s::%s", f.Namespace.Name, pod1, "busybox-container"): boundedSample(0, 100),
}),
"container_memory_working_set_bytes": gstruct.MatchAllElements(containerID, gstruct.Elements{
"container_memory_working_set_bytes": gstruct.MatchElements(containerID, gstruct.IgnoreExtras, gstruct.Elements{
fmt.Sprintf("%s::%s::%s", f.Namespace.Name, pod0, "busybox-container"): boundedSample(10*e2evolume.Kb, 80*e2evolume.Mb),
fmt.Sprintf("%s::%s::%s", f.Namespace.Name, pod1, "busybox-container"): boundedSample(10*e2evolume.Kb, 80*e2evolume.Mb),
}),