mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
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
This commit is contained in:
commit
f920391755
@ -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},
|
||||
|
Loading…
Reference in New Issue
Block a user