Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KUBESAW-43: Replace the special ToolchainClusterCondition with the standard toolchain Condition #955

Merged
merged 21 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
module github.com/codeready-toolchain/toolchain-e2e

replace github.com/codeready-toolchain/api => github.com/fbm3307/toolchainapi v0.0.0-20240527070911-f37a60567c8b

replace github.com/codeready-toolchain/toolchain-common => github.com/fbm3307/toolchain-common v0.0.0-20240527085525-a1bc979c9c70

require (
github.com/codeready-toolchain/api v0.0.0-20240514085958-3b5237399fe5
github.com/codeready-toolchain/toolchain-common v0.0.0-20240514101749-1ceadb6ea36b
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z
github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo=
github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA=
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
github.com/codeready-toolchain/api v0.0.0-20240514085958-3b5237399fe5 h1:lfW7VPmj70Tt75VzgOfAdVEGKMCR5/zACugWl1BDw34=
github.com/codeready-toolchain/api v0.0.0-20240514085958-3b5237399fe5/go.mod h1:ie9p4LenCCS0LsnbWp6/xwpFDdCWYE0KWzUO6Sk1g0E=
github.com/codeready-toolchain/toolchain-common v0.0.0-20240514101749-1ceadb6ea36b h1:9WGqXkgAmnMOYUvYSdeIszTfE5NbuZ2hmibXchTU7r0=
github.com/codeready-toolchain/toolchain-common v0.0.0-20240514101749-1ceadb6ea36b/go.mod h1:oG4ywphvcYpFuaxrJcAkEVrBfhXsXPPQ2ieF3Y+e/wo=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
Expand Down Expand Up @@ -183,6 +179,10 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL
github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc=
github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI=
github.com/fbm3307/toolchain-common v0.0.0-20240527085525-a1bc979c9c70 h1:bXkUar0zqhEjnWkrmcWAuRVh4Kzl5Og//XJ2APnFjOI=
github.com/fbm3307/toolchain-common v0.0.0-20240527085525-a1bc979c9c70/go.mod h1:CEYP+kvf4ckNVUocGJHTQNKAOwg21Dy2JtEUlYqSGic=
github.com/fbm3307/toolchainapi v0.0.0-20240527070911-f37a60567c8b h1:fF3V9dFDmZCzbV2rWkII7b/LJ9hj5yL2zR0vdaXzeK4=
github.com/fbm3307/toolchainapi v0.0.0-20240527070911-f37a60567c8b/go.mod h1:ie9p4LenCCS0LsnbWp6/xwpFDdCWYE0KWzUO6Sk1g0E=
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
Expand Down
16 changes: 2 additions & 14 deletions setup/users/create_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"fmt"

toolchainv1alpha1 "github.com/codeready-toolchain/api/api/v1alpha1"
"github.com/codeready-toolchain/toolchain-common/pkg/condition"
"github.com/codeready-toolchain/toolchain-common/pkg/hash"
"github.com/codeready-toolchain/toolchain-common/pkg/states"
"github.com/codeready-toolchain/toolchain-e2e/setup/configuration"
"github.com/codeready-toolchain/toolchain-e2e/testsupport/wait"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
k8swait "k8s.io/apimachinery/pkg/util/wait"
Expand Down Expand Up @@ -59,7 +59,7 @@ func getMemberClusterName(cl client.Client, hostOperatorNamespace, memberOperato
return false, err
}
for _, cluster := range clusters.Items {
if containsClusterCondition(cluster.Status.Conditions, wait.ReadyToolchainCluster) {
if condition.IsTrue(cluster.Status.Conditions, toolchainv1alpha1.ToolchainClusterReady) {
memberCluster = cluster
return true, nil
}
Expand All @@ -68,15 +68,3 @@ func getMemberClusterName(cl client.Client, hostOperatorNamespace, memberOperato
})
return memberCluster.Name, err
}

func containsClusterCondition(conditions []toolchainv1alpha1.ToolchainClusterCondition, contains *toolchainv1alpha1.ToolchainClusterCondition) bool {
if contains == nil {
return true
}
for _, c := range conditions {
if c.Type == contains.Type {
return contains.Status == c.Status
}
}
return false
}
2 changes: 1 addition & 1 deletion setup/users/create_users_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestCreate(t *testing.T) {
},
},
Status: toolchainv1alpha1.ToolchainClusterStatus{
Conditions: []toolchainv1alpha1.ToolchainClusterCondition{
Conditions: []toolchainv1alpha1.Condition{
{
Type: toolchainv1alpha1.ToolchainClusterReady,
Status: corev1.ConditionTrue,
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/parallel/registration_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ func assertGetSignupStatusProvisioned(t *testing.T, await wait.Awaitilities, use
assert.Equal(t, transformedUsername, mp["compliantUsername"])
assert.Equal(t, username, mp["username"])
assert.Equal(t, memberAwait.GetConsoleURL(t), mp["consoleURL"])
memberCluster, found, err := hostAwait.GetToolchainCluster(t, memberAwait.Namespace, nil)
memberCluster, found, err := hostAwait.GetToolchainCluster(t, memberAwait.Namespace, toolchainv1alpha1.ToolchainClusterReady)
require.NoError(t, err)
require.True(t, found)
assert.Equal(t, memberCluster.Spec.APIEndpoint, mp["apiEndpoint"])
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/parallel/spacerequest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestCreateSpaceRequest(t *testing.T) {
hostAwait := awaitilities.Host()
memberAwait := awaitilities.Member1()
memberAwait2 := awaitilities.Member2()
memberCluster, found, err := hostAwait.GetToolchainCluster(t, memberAwait.Namespace, nil)
memberCluster, found, err := hostAwait.GetToolchainCluster(t, memberAwait.Namespace, toolchainv1alpha1.ToolchainClusterReady)
require.NoError(t, err)
require.True(t, found)

Expand Down Expand Up @@ -201,7 +201,7 @@ func TestCreateSpaceRequest(t *testing.T) {
t.Run("subSpace target cluster is different from spacerequest cluster", func(t *testing.T) {
// when
// we add a custom cluster-role for member2
memberCluster2, found, err := hostAwait.GetToolchainCluster(t, memberAwait2.Namespace, nil)
memberCluster2, found, err := hostAwait.GetToolchainCluster(t, memberAwait2.Namespace, toolchainv1alpha1.ToolchainClusterReady)
require.NoError(t, err)
require.True(t, found)
spaceprovisionerconfig.UpdateForCluster(t, hostAwait.Awaitility, memberCluster2.Name, testSpc.WithPlacementRoles(cluster.RoleLabel("member-2")))
Expand Down
17 changes: 7 additions & 10 deletions test/e2e/toolchaincluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestToolchainClusterE2E(t *testing.T) {
// in the target cluster type operator
func verifyToolchainCluster(t *testing.T, await *wait.Awaitility, otherAwait *wait.Awaitility, shouldHaveReferencedSecret bool) {
// given
current, ok, err := await.GetToolchainCluster(t, otherAwait.Namespace, nil)
current, ok, err := await.GetToolchainCluster(t, otherAwait.Namespace, toolchainv1alpha1.ToolchainClusterReady)
require.NoError(t, err)
require.True(t, ok, "ToolchainCluster should exist")

Expand Down Expand Up @@ -77,7 +77,7 @@ func verifyToolchainCluster(t *testing.T, await *wait.Awaitility, otherAwait *wa
// then the ToolchainCluster should be ready
_, err = await.WaitForToolchainCluster(t,
wait.UntilToolchainClusterHasName(toolchainCluster.Name),
wait.UntilToolchainClusterHasCondition(*wait.ReadyToolchainCluster),
wait.UntilToolchainClusterHasCondition(toolchainv1alpha1.ToolchainClusterReady),
)
require.NoError(t, err)
// other ToolchainCluster should be ready, too
Expand All @@ -86,13 +86,13 @@ func verifyToolchainCluster(t *testing.T, await *wait.Awaitility, otherAwait *wa
client.MatchingLabels{
"namespace": otherAwait.Namespace,
},
), wait.UntilToolchainClusterHasCondition(*wait.ReadyToolchainCluster),
), wait.UntilToolchainClusterHasCondition(toolchainv1alpha1.ToolchainClusterReady),
)
require.NoError(t, err)
_, err = otherAwait.WaitForToolchainCluster(t,
wait.UntilToolchainClusterHasLabels(client.MatchingLabels{
"namespace": await.Namespace,
}), wait.UntilToolchainClusterHasCondition(*wait.ReadyToolchainCluster),
}), wait.UntilToolchainClusterHasCondition(toolchainv1alpha1.ToolchainClusterReady),
)
require.NoError(t, err)
})
Expand Down Expand Up @@ -120,10 +120,7 @@ func verifyToolchainCluster(t *testing.T, await *wait.Awaitility, otherAwait *wa
require.NoError(t, err)
_, err = await.WaitForToolchainCluster(t,
wait.UntilToolchainClusterHasName(toolchainCluster.Name),
wait.UntilToolchainClusterHasCondition(toolchainv1alpha1.ToolchainClusterCondition{
Type: toolchainv1alpha1.ToolchainClusterOffline,
Status: corev1.ConditionTrue,
}),
wait.UntilToolchainClusterHasCondition(toolchainv1alpha1.ToolchainClusterOffline),
)
require.NoError(t, err)
// other ToolchainCluster should be ready, too
Expand All @@ -132,13 +129,13 @@ func verifyToolchainCluster(t *testing.T, await *wait.Awaitility, otherAwait *wa
client.MatchingLabels{
"namespace": otherAwait.Namespace,
},
), wait.UntilToolchainClusterHasCondition(*wait.ReadyToolchainCluster),
), wait.UntilToolchainClusterHasCondition(toolchainv1alpha1.ToolchainClusterReady),
)
require.NoError(t, err)
_, err = otherAwait.WaitForToolchainCluster(t,
wait.UntilToolchainClusterHasLabels(client.MatchingLabels{
"namespace": await.Namespace,
}), wait.UntilToolchainClusterHasCondition(*wait.ReadyToolchainCluster),
}), wait.UntilToolchainClusterHasCondition(toolchainv1alpha1.ToolchainClusterReady),
)
require.NoError(t, err)
})
Expand Down
2 changes: 1 addition & 1 deletion test/migration/verify/verify_migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func verifyProvisionedSubSpace(t *testing.T, awaitilities wait.Awaitilities) {
targetClusterRoles := []string{cluster.RoleLabel(cluster.Tenant)}
hostAwait := awaitilities.Host()
memberAwait := awaitilities.Member2()
memberCluster, found, err := hostAwait.GetToolchainCluster(t, memberAwait.Namespace, nil)
memberCluster, found, err := hostAwait.GetToolchainCluster(t, memberAwait.Namespace, toolchainv1alpha1.ToolchainClusterReady)
require.NoError(t, err)
require.True(t, found)
subSpaceNamespace := GetDefaultNamespace(parentSpace.Status.ProvisionedNamespaces)
Expand Down
6 changes: 3 additions & 3 deletions testsupport/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ func waitForOperators(t *testing.T) {

initMember2Await = getMemberAwaitility(t, initHostAwait, kubeconfig, memberNs2)

_, err = initMemberAwait.WaitForToolchainClusterWithCondition(t, initHostAwait.Namespace, wait.ReadyToolchainCluster)
_, err = initMemberAwait.WaitForToolchainClusterWithCondition(t, initHostAwait.Namespace, toolchainv1alpha1.ToolchainClusterReady)
require.NoError(t, err)

_, err = initMember2Await.WaitForToolchainClusterWithCondition(t, initHostAwait.Namespace, wait.ReadyToolchainCluster)
_, err = initMember2Await.WaitForToolchainClusterWithCondition(t, initHostAwait.Namespace, toolchainv1alpha1.ToolchainClusterReady)
require.NoError(t, err)

t.Log("all operators are ready and in running state")
Expand Down Expand Up @@ -235,7 +235,7 @@ func getMemberAwaitility(t *testing.T, hostAwait *wait.HostAwaitility, restconfi
})
require.NoError(t, err)

memberCluster, err := hostAwait.WaitForToolchainClusterWithCondition(t, namespace, wait.ReadyToolchainCluster)
memberCluster, err := hostAwait.WaitForToolchainClusterWithCondition(t, namespace, toolchainv1alpha1.ToolchainClusterReady)
require.NoError(t, err)
clusterName := memberCluster.Name
memberAwait := wait.NewMemberAwaitility(restconfig, memberClient, namespace, clusterName)
Expand Down
2 changes: 1 addition & 1 deletion testsupport/toolchain_status_assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func VerifyMemberStatus(t *testing.T, memberAwait *wait.MemberAwaitility, expect
}

func VerifyToolchainStatus(t *testing.T, hostAwait *wait.HostAwaitility, memberAwait *wait.MemberAwaitility) {
memberCluster, found, err := hostAwait.GetToolchainCluster(t, memberAwait.Namespace, nil)
memberCluster, found, err := hostAwait.GetToolchainCluster(t, memberAwait.Namespace, toolchainv1alpha1.ToolchainClusterReady)
require.NoError(t, err)
require.True(t, found)
_, err = hostAwait.WaitForToolchainStatus(t, wait.UntilToolchainStatusHasConditions(wait.ToolchainStatusReadyAndUnreadyNotificationNotCreated()...),
Expand Down
2 changes: 1 addition & 1 deletion testsupport/user_assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func verifyUserAccount(t *testing.T, awaitilities wait.Awaitilities, userSignup
}

// Get member cluster to verify that it was used to provision user accounts
memberCluster, ok, err := hostAwait.GetToolchainCluster(t, memberAwait.Namespace, nil)
memberCluster, ok, err := hostAwait.GetToolchainCluster(t, memberAwait.Namespace, toolchainv1alpha1.ToolchainClusterReady)
require.NoError(t, err)
require.True(t, ok)

Expand Down
41 changes: 12 additions & 29 deletions testsupport/wait/awaitility.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (

toolchainv1alpha1 "github.com/codeready-toolchain/api/api/v1alpha1"
"github.com/codeready-toolchain/toolchain-common/pkg/cluster"
cd "github.com/codeready-toolchain/toolchain-common/pkg/condition"
"github.com/codeready-toolchain/toolchain-common/pkg/status"
"github.com/codeready-toolchain/toolchain-common/pkg/test"
"github.com/codeready-toolchain/toolchain-common/pkg/test/assertions"
Expand Down Expand Up @@ -70,12 +71,6 @@ func (a *Awaitility) copy() *Awaitility {
return result
}

// ReadyToolchainCluster is a ClusterCondition that represents cluster that is ready
var ReadyToolchainCluster = &toolchainv1alpha1.ToolchainClusterCondition{
Type: toolchainv1alpha1.ToolchainClusterReady,
Status: corev1.ConditionTrue,
}

// WithRetryOptions returns a new Awaitility with the given "RetryOption"s applied
func (a *Awaitility) WithRetryOptions(options ...RetryOption) *Awaitility {
result := a.copy()
Expand Down Expand Up @@ -161,16 +156,16 @@ func (a *Awaitility) WaitForService(t *testing.T, name string) (corev1.Service,
// WaitForToolchainClusterWithCondition waits until there is a ToolchainCluster representing a operator of the given type
// and running in the given expected namespace. If the given condition is not nil, then it also checks
// if the CR has the ClusterCondition
fbm3307 marked this conversation as resolved.
Show resolved Hide resolved
func (a *Awaitility) WaitForToolchainClusterWithCondition(t *testing.T, namespace string, condition *toolchainv1alpha1.ToolchainClusterCondition) (toolchainv1alpha1.ToolchainCluster, error) {
func (a *Awaitility) WaitForToolchainClusterWithCondition(t *testing.T, namespace string, cdtype toolchainv1alpha1.ConditionType) (toolchainv1alpha1.ToolchainCluster, error) {
t.Logf("waiting for ToolchainCluster in namespace '%s'", namespace)
timeout := a.Timeout
if condition != nil {
if cdtype != "" {
timeout = ToolchainClusterConditionTimeout
}
var c toolchainv1alpha1.ToolchainCluster
err := wait.Poll(a.RetryInterval, timeout, func() (done bool, err error) {
fbm3307 marked this conversation as resolved.
Show resolved Hide resolved
var ready bool
if c, ready, err = a.GetToolchainCluster(t, namespace, condition); ready {
if c, ready, err = a.GetToolchainCluster(t, namespace, cdtype); ready {
return true, nil
}
return false, err
Expand All @@ -180,10 +175,10 @@ func (a *Awaitility) WaitForToolchainClusterWithCondition(t *testing.T, namespac

// WaitForNamedToolchainClusterWithCondition waits until there is a ToolchainCluster with the given name
// and with the given ClusterCondition (if it the condition is nil, then it skips this check)
func (a *Awaitility) WaitForNamedToolchainClusterWithCondition(t *testing.T, name string, condition *toolchainv1alpha1.ToolchainClusterCondition) (toolchainv1alpha1.ToolchainCluster, error) {
t.Logf("waiting for ToolchainCluster '%s' in namespace '%s' to have condition '%v'", name, a.Namespace, condition)
func (a *Awaitility) WaitForNamedToolchainClusterWithCondition(t *testing.T, name string, cdtype toolchainv1alpha1.ConditionType) (toolchainv1alpha1.ToolchainCluster, error) {
fbm3307 marked this conversation as resolved.
Show resolved Hide resolved
t.Logf("waiting for ToolchainCluster '%s' in namespace '%s' to have condition '%v'", name, a.Namespace, cdtype)
timeout := a.Timeout
if condition != nil {
if cdtype != "" {
timeout = ToolchainClusterConditionTimeout
}
fbm3307 marked this conversation as resolved.
Show resolved Hide resolved
c := toolchainv1alpha1.ToolchainCluster{}
Expand All @@ -192,7 +187,7 @@ func (a *Awaitility) WaitForNamedToolchainClusterWithCondition(t *testing.T, nam
if err := a.Client.Get(context.TODO(), types.NamespacedName{Namespace: a.Namespace, Name: name}, &c); err != nil {
return false, err
}
if containsClusterCondition(c.Status.Conditions, condition) {
if cd.IsTrue(c.Status.Conditions, toolchainv1alpha1.ToolchainClusterReady) {
return true, nil
}
return false, err
Expand All @@ -203,7 +198,7 @@ func (a *Awaitility) WaitForNamedToolchainClusterWithCondition(t *testing.T, nam
// GetToolchainCluster retrieves and returns a ToolchainCluster representing a operator of the given type
// and running in the given expected namespace. If the given condition is not nil, then it also checks
// if the CR has the ClusterCondition
func (a *Awaitility) GetToolchainCluster(t *testing.T, namespace string, condition *toolchainv1alpha1.ToolchainClusterCondition) (toolchainv1alpha1.ToolchainCluster, bool, error) {
func (a *Awaitility) GetToolchainCluster(t *testing.T, namespace string, cdtype toolchainv1alpha1.ConditionType) (toolchainv1alpha1.ToolchainCluster, bool, error) {
clusters := &toolchainv1alpha1.ToolchainClusterList{}
if err := a.Client.List(context.TODO(), clusters, client.InNamespace(a.Namespace), client.MatchingLabels{
"namespace": namespace,
Expand All @@ -215,25 +210,13 @@ func (a *Awaitility) GetToolchainCluster(t *testing.T, namespace string, conditi
}
// assume there is zero or 1 match only
for _, cl := range clusters.Items {
if containsClusterCondition(cl.Status.Conditions, condition) {
if cd.IsTrue(cl.Status.Conditions, cdtype) {
return cl, true, nil
}
}
return toolchainv1alpha1.ToolchainCluster{}, false, nil
}

func containsClusterCondition(conditions []toolchainv1alpha1.ToolchainClusterCondition, contains *toolchainv1alpha1.ToolchainClusterCondition) bool {
if contains == nil {
return true
}
for _, c := range conditions {
if c.Type == contains.Type {
return contains.Status == c.Status
}
}
return false
}

// SetupRouteForService if needed, creates a route for the given service (with the same namespace/name)
// It waits until the route is available (or returns an error) by first checking the resource status
// and then making a call to the given endpoint
Expand Down Expand Up @@ -575,10 +558,10 @@ func UntilToolchainClusterHasName(expectedName string) ToolchainClusterWaitCrite
}

// UntilToolchainClusterHasCondition checks if ToolchainCluster has the given condition
func UntilToolchainClusterHasCondition(expected toolchainv1alpha1.ToolchainClusterCondition) ToolchainClusterWaitCriterion {
func UntilToolchainClusterHasCondition(expected toolchainv1alpha1.ConditionType) ToolchainClusterWaitCriterion {
return ToolchainClusterWaitCriterion{
Match: func(actual *toolchainv1alpha1.ToolchainCluster) bool {
return containsClusterCondition(actual.Status.Conditions, &expected)
return cd.IsTrue(actual.Status.Conditions, expected)
},
}
}
Expand Down
Loading