Commit f9203917 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #38139 from sjug/clusterverify_ns

Automatic merge from submit-queue (batch tested with PRs 37032, 38119, 38186, 38200, 38139) New ns param for NewClusterVerification **What this PR does / why we need it**: Allows the test to specify alternate namespaces to when waiting for pods to be in a specific state. **Which issue this PR fixes**: fixes #38138 **Special notes for your reviewer**: Minor fix **Release note**: None
parents 6cfe041b 98864265
......@@ -48,6 +48,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() {
// Reusable cluster state function. This won't be adversly affected by lazy initialization of framework.
clusterState := func(selectorKey string, selectorValue string) *framework.ClusterVerification {
return f.NewClusterVerification(
f.Namespace,
framework.PodStateVerification{
Selectors: map[string]string{selectorKey: selectorValue},
ValidPhases: []v1.PodPhase{v1.PodRunning},
......
......@@ -853,10 +853,10 @@ type ClusterVerification struct {
podState PodStateVerification
}
func (f *Framework) NewClusterVerification(filter PodStateVerification) *ClusterVerification {
func (f *Framework) NewClusterVerification(namespace *v1.Namespace, filter PodStateVerification) *ClusterVerification {
return &ClusterVerification{
f.ClientSet,
f.Namespace,
namespace,
filter,
}
}
......
......@@ -267,6 +267,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
// Reustable cluster state function. This won't be adversly affected by lazy initialization of framework.
clusterState := func() *framework.ClusterVerification {
return f.NewClusterVerification(
f.Namespace,
framework.PodStateVerification{
Selectors: map[string]string{"app": "redis"},
ValidPhases: []v1.PodPhase{v1.PodRunning /*v1.PodPending*/},
......
......@@ -114,6 +114,7 @@ func RunLogPodsWithSleepOf(f *framework.Framework, sleep time.Duration, podname
)
logSoakVerification := f.NewClusterVerification(
f.Namespace,
framework.PodStateVerification{
Selectors: podlables,
ValidPhases: []v1.PodPhase{v1.PodRunning, v1.PodSucceeded},
......
......@@ -119,6 +119,7 @@ var _ = framework.KubeDescribe("Networking IPerf [Experimental] [Slow] [Feature:
iperfResults := &IPerfResults{}
iperfClusterVerification := f.NewClusterVerification(
f.Namespace,
framework.PodStateVerification{
Selectors: iperfClientPodLabels,
ValidPhases: []v1.PodPhase{v1.PodSucceeded},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment