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 #391

Merged
merged 11 commits into from
May 30, 2024
32 changes: 14 additions & 18 deletions controllers/toolchaincluster/healthchecker.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,54 +64,50 @@ func (hc *HealthChecker) getClusterHealthStatus(ctx context.Context) *toolchainv
return &clusterStatus
}

func clusterReadyCondition() toolchainv1alpha1.ToolchainClusterCondition {
func clusterReadyCondition() toolchainv1alpha1.Condition {
currentTime := metav1.Now()
return toolchainv1alpha1.ToolchainClusterCondition{
Type: toolchainv1alpha1.ToolchainClusterReady,
return toolchainv1alpha1.Condition{
Type: toolchainv1alpha1.ConditionReady,
Status: corev1.ConditionTrue,
Reason: toolchainv1alpha1.ToolchainClusterClusterReadyReason,
Message: healthzOk,
LastProbeTime: currentTime,
LastUpdatedTime: &currentTime,
LastTransitionTime: &currentTime,
LastTransitionTime: currentTime,
}
}

func clusterNotReadyCondition() toolchainv1alpha1.ToolchainClusterCondition {
func clusterNotReadyCondition() toolchainv1alpha1.Condition {
currentTime := metav1.Now()
return toolchainv1alpha1.ToolchainClusterCondition{
Type: toolchainv1alpha1.ToolchainClusterReady,
return toolchainv1alpha1.Condition{
Type: toolchainv1alpha1.ConditionReady,
Status: corev1.ConditionFalse,
Reason: toolchainv1alpha1.ToolchainClusterClusterNotReadyReason,
Message: healthzNotOk,
LastProbeTime: currentTime,
LastUpdatedTime: &currentTime,
LastTransitionTime: &currentTime,
LastTransitionTime: currentTime,
}
}

func clusterOfflineCondition() toolchainv1alpha1.ToolchainClusterCondition {
func clusterOfflineCondition() toolchainv1alpha1.Condition {
currentTime := metav1.Now()
return toolchainv1alpha1.ToolchainClusterCondition{
return toolchainv1alpha1.Condition{
Type: toolchainv1alpha1.ToolchainClusterOffline,
Status: corev1.ConditionTrue,
Reason: toolchainv1alpha1.ToolchainClusterClusterNotReachableReason,
Message: clusterNotReachableMsg,
LastProbeTime: currentTime,
LastUpdatedTime: &currentTime,
LastTransitionTime: &currentTime,
LastTransitionTime: currentTime,
}
}

func clusterNotOfflineCondition() toolchainv1alpha1.ToolchainClusterCondition {
func clusterNotOfflineCondition() toolchainv1alpha1.Condition {
currentTime := metav1.Now()
return toolchainv1alpha1.ToolchainClusterCondition{
return toolchainv1alpha1.Condition{
Type: toolchainv1alpha1.ToolchainClusterOffline,
Status: corev1.ConditionFalse,
Reason: toolchainv1alpha1.ToolchainClusterClusterReachableReason,
Message: clusterReachableMsg,
LastProbeTime: currentTime,
LastUpdatedTime: &currentTime,
LastTransitionTime: &currentTime,
LastTransitionTime: currentTime,
}
}
40 changes: 20 additions & 20 deletions controllers/toolchaincluster/healthchecker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,59 +41,59 @@ func TestClusterHealthChecks(t *testing.T) {
tests := map[string]struct {
tctype string
apiendpoint string
clusterconditions []toolchainv1alpha1.ToolchainClusterCondition
clusterconditions []toolchainv1alpha1.Condition
status toolchainv1alpha1.ToolchainClusterStatus
}{
//ToolchainCluster.status doesn't contain any conditions
"UnstableNoCondition": {
tctype: "unstable",
apiendpoint: "http://unstable.com",
clusterconditions: []toolchainv1alpha1.ToolchainClusterCondition{unhealthy(), notOffline()},
clusterconditions: []toolchainv1alpha1.Condition{unhealthy(), notOffline()},
status: toolchainv1alpha1.ToolchainClusterStatus{},
},
"StableNoCondition": {
tctype: "stable",
apiendpoint: "http://cluster.com",
clusterconditions: []toolchainv1alpha1.ToolchainClusterCondition{healthy()},
clusterconditions: []toolchainv1alpha1.Condition{healthy()},
status: toolchainv1alpha1.ToolchainClusterStatus{},
},
"NotFoundNoCondition": {
tctype: "not-found",
apiendpoint: "http://not-found.com",
clusterconditions: []toolchainv1alpha1.ToolchainClusterCondition{offline()},
clusterconditions: []toolchainv1alpha1.Condition{offline()},
status: toolchainv1alpha1.ToolchainClusterStatus{},
},
//ToolchainCluster.status already contains conditions
"UnstableContainsCondition": {
tctype: "unstable",
apiendpoint: "http://unstable.com",
clusterconditions: []toolchainv1alpha1.ToolchainClusterCondition{unhealthy(), notOffline()},
clusterconditions: []toolchainv1alpha1.Condition{unhealthy(), notOffline()},
status: withStatus(healthy()),
},
"StableContainsCondition": {
tctype: "stable",
apiendpoint: "http://cluster.com",
clusterconditions: []toolchainv1alpha1.ToolchainClusterCondition{healthy()},
clusterconditions: []toolchainv1alpha1.Condition{healthy()},
status: withStatus(offline()),
},
"NotFoundContainsCondition": {
tctype: "not-found",
apiendpoint: "http://not-found.com",
clusterconditions: []toolchainv1alpha1.ToolchainClusterCondition{offline()},
clusterconditions: []toolchainv1alpha1.Condition{offline()},
status: withStatus(healthy()),
},
//if the connection cannot be established at beginning, then it should be offline
"OfflineConnectionNotEstablished": {
tctype: "failing",
apiendpoint: "http://failing.com",
clusterconditions: []toolchainv1alpha1.ToolchainClusterCondition{offline()},
clusterconditions: []toolchainv1alpha1.Condition{offline()},
status: toolchainv1alpha1.ToolchainClusterStatus{},
},
//if no zones nor region is retrieved, then keep the current
"NoZoneKeepCurrent": {
tctype: "stable",
apiendpoint: "http://cluster.com",
clusterconditions: []toolchainv1alpha1.ToolchainClusterCondition{healthy()},
clusterconditions: []toolchainv1alpha1.Condition{healthy()},
status: withStatus(offline()),
},
}
Expand Down Expand Up @@ -123,12 +123,12 @@ func TestClusterHealthChecks(t *testing.T) {
}
}

func withStatus(conditions ...toolchainv1alpha1.ToolchainClusterCondition) toolchainv1alpha1.ToolchainClusterStatus {
func withStatus(conditions ...toolchainv1alpha1.Condition) toolchainv1alpha1.ToolchainClusterStatus {
return toolchainv1alpha1.ToolchainClusterStatus{
Conditions: conditions,
}
}
func assertClusterStatus(t *testing.T, cl client.Client, clusterName string, clusterConds ...toolchainv1alpha1.ToolchainClusterCondition) {
func assertClusterStatus(t *testing.T, cl client.Client, clusterName string, clusterConds ...toolchainv1alpha1.Condition) {
tc := &toolchainv1alpha1.ToolchainCluster{}
err := cl.Get(context.TODO(), test.NamespacedName("test-namespace", clusterName), tc)
require.NoError(t, err)
Expand All @@ -146,30 +146,30 @@ ExpConditions:
assert.Failf(t, "condition not found", "the list of conditions %v doesn't contain the expected condition %v", tc.Status.Conditions, expCond)
}
}
func healthy() toolchainv1alpha1.ToolchainClusterCondition {
return toolchainv1alpha1.ToolchainClusterCondition{
Type: toolchainv1alpha1.ToolchainClusterReady,
func healthy() toolchainv1alpha1.Condition {
return toolchainv1alpha1.Condition{
Type: toolchainv1alpha1.ConditionReady,
Status: corev1.ConditionTrue,
Reason: "ClusterReady",
Message: "/healthz responded with ok",
}
}
func unhealthy() toolchainv1alpha1.ToolchainClusterCondition {
return toolchainv1alpha1.ToolchainClusterCondition{Type: toolchainv1alpha1.ToolchainClusterReady,
func unhealthy() toolchainv1alpha1.Condition {
return toolchainv1alpha1.Condition{Type: toolchainv1alpha1.ConditionReady,
Status: corev1.ConditionFalse,
Reason: "ClusterNotReady",
Message: "/healthz responded without ok",
}
}
func offline() toolchainv1alpha1.ToolchainClusterCondition {
return toolchainv1alpha1.ToolchainClusterCondition{Type: toolchainv1alpha1.ToolchainClusterOffline,
func offline() toolchainv1alpha1.Condition {
return toolchainv1alpha1.Condition{Type: toolchainv1alpha1.ToolchainClusterOffline,
Status: corev1.ConditionTrue,
Reason: "ClusterNotReachable",
Message: "cluster is not reachable",
}
}
func notOffline() toolchainv1alpha1.ToolchainClusterCondition {
return toolchainv1alpha1.ToolchainClusterCondition{Type: toolchainv1alpha1.ToolchainClusterOffline,
func notOffline() toolchainv1alpha1.Condition {
return toolchainv1alpha1.Condition{Type: toolchainv1alpha1.ToolchainClusterOffline,
Status: corev1.ConditionFalse,
Reason: "ClusterReachable",
Message: "cluster is reachable",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.
cachedCluster, ok := cluster.GetCachedToolchainCluster(toolchainCluster.Name)
if !ok {
err := fmt.Errorf("cluster %s not found in cache", toolchainCluster.Name)
toolchainCluster.Status.Conditions = []toolchainv1alpha1.ToolchainClusterCondition{clusterOfflineCondition()}
toolchainCluster.Status.Conditions = []toolchainv1alpha1.Condition{clusterOfflineCondition()}
if err := r.Client.Status().Update(ctx, toolchainCluster); err != nil {
reqLogger.Error(err, "failed to update the status of ToolchainCluster")
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/codeready-toolchain/toolchain-common
go 1.20

require (
github.com/codeready-toolchain/api v0.0.0-20240514085958-3b5237399fe5
github.com/codeready-toolchain/api v0.0.0-20240530120602-c11598ccffb7
github.com/go-logr/logr v1.2.3
github.com/golang-jwt/jwt/v5 v5.2.0
github.com/lestrrat-go/jwx v1.2.29
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWH
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/api v0.0.0-20240530120602-c11598ccffb7 h1:o5JLcHCVS1BlZevw2mh1mH+iKwn9fLUrT1Ek8NFjvPY=
github.com/codeready-toolchain/api v0.0.0-20240530120602-c11598ccffb7/go.mod h1:ie9p4LenCCS0LsnbWp6/xwpFDdCWYE0KWzUO6Sk1g0E=
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
8 changes: 4 additions & 4 deletions pkg/cluster/cache_whitebox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,16 +398,16 @@ type clusterOption func(*CachedToolchainCluster)

// Ready an option to state the cluster as "ready"
var ready clusterOption = func(c *CachedToolchainCluster) {
c.ClusterStatus.Conditions = append(c.ClusterStatus.Conditions, toolchainv1alpha1.ToolchainClusterCondition{
Type: toolchainv1alpha1.ToolchainClusterReady,
c.ClusterStatus.Conditions = append(c.ClusterStatus.Conditions, toolchainv1alpha1.Condition{
Type: toolchainv1alpha1.ConditionReady,
Status: v1.ConditionTrue,
})
}

// clusterNotReady an option to state the cluster as "not ready"
var notReady clusterOption = func(c *CachedToolchainCluster) {
c.ClusterStatus.Conditions = append(c.ClusterStatus.Conditions, toolchainv1alpha1.ToolchainClusterCondition{
Type: toolchainv1alpha1.ToolchainClusterReady,
c.ClusterStatus.Conditions = append(c.ClusterStatus.Conditions, toolchainv1alpha1.Condition{
Type: toolchainv1alpha1.ConditionReady,
Status: v1.ConditionFalse,
})
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func NewClusterConfig(cl client.Client, toolchainCluster *toolchainv1alpha1.Tool

func IsReady(clusterStatus *toolchainv1alpha1.ToolchainClusterStatus) bool {
for _, condition := range clusterStatus.Conditions {
if condition.Type == toolchainv1alpha1.ToolchainClusterReady {
if condition.Type == toolchainv1alpha1.ConditionReady {
if condition.Status == v1.ConditionTrue {
return true
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func TestDeleteToolchainClusterWhenDoesNotExist(t *testing.T) {

func TestListToolchainClusterConfigs(t *testing.T) {
// given
status := test.NewClusterStatus(toolchainv1alpha1.ToolchainClusterReady, corev1.ConditionTrue)
status := test.NewClusterStatus(toolchainv1alpha1.ConditionReady, corev1.ConditionTrue)
require.NoError(t, toolchainv1alpha1.AddToScheme(scheme.Scheme))

m1, sec1 := test.NewToolchainClusterWithEndpoint("east", test.HostOperatorNs, "secret1", "http://m1.com", status, map[string]string{"ownerClusterName": "m1ClusterName", "namespace": test.MemberOperatorNs, cluster.RoleLabel(cluster.Tenant): ""})
Expand Down
4 changes: 2 additions & 2 deletions pkg/cluster/service_whitebox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
func TestRefreshCacheInService(t *testing.T) {
// given
defer gock.Off()
status := test.NewClusterStatus(toolchainv1alpha1.ToolchainClusterReady, corev1.ConditionTrue)
status := test.NewClusterStatus(toolchainv1alpha1.ConditionReady, corev1.ConditionTrue)
toolchainCluster, sec := test.NewToolchainCluster("east", test.HostOperatorNs, "secret", status, map[string]string{"ownerClusterName": test.NameMember, "namespace": test.MemberOperatorNs})
s := scheme.Scheme
err := toolchainv1alpha1.AddToScheme(s)
Expand Down Expand Up @@ -74,7 +74,7 @@ func TestRefreshCacheInService(t *testing.T) {
func TestUpdateClientBasedOnRestConfig(t *testing.T) {
// given
defer gock.Off()
statusTrue := test.NewClusterStatus(toolchainv1alpha1.ToolchainClusterReady, corev1.ConditionTrue)
statusTrue := test.NewClusterStatus(toolchainv1alpha1.ConditionReady, corev1.ConditionTrue)
toolchainCluster1, sec1 := test.NewToolchainCluster("east", test.HostOperatorNs, "secret1", statusTrue,
map[string]string{"namespace": test.HostOperatorNs})

Expand Down
19 changes: 7 additions & 12 deletions pkg/status/toolchaincluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,22 @@ func GetToolchainClusterConditions(logger logr.Logger, attrs ToolchainClusterAtt
return []toolchainv1alpha1.Condition{*NewComponentErrorCondition(toolchainv1alpha1.ToolchainStatusClusterConnectionNotReadyReason, genericErrMsg)}
}

var lastProbeTime metav1.Time
foundLastProbeTime := false
var lastUpdatedTime metav1.Time
foundLastUpdatedTime := false
for _, condition := range toolchainCluster.ClusterStatus.Conditions {
if condition.Type == toolchainv1alpha1.ToolchainClusterReady {
lastProbeTime = func() metav1.Time {
if condition.LastUpdatedTime != nil {
return *condition.LastUpdatedTime
}
return condition.LastProbeTime
}()
foundLastProbeTime = true
if condition.Type == toolchainv1alpha1.ConditionReady {
lastUpdatedTime = *condition.LastUpdatedTime
foundLastUpdatedTime = true
}

}
if !foundLastProbeTime {
if !foundLastUpdatedTime {
lastProbeNotFoundMsg := "the time of the last probe could not be determined"
return []toolchainv1alpha1.Condition{*NewComponentErrorCondition(toolchainv1alpha1.ToolchainStatusClusterConnectionNotReadyReason, lastProbeNotFoundMsg)}
}
maxDuration := attrs.Period + attrs.Timeout
// check that the last probe time is within limits. It should be less than period + timeout
timeSinceLastProbe := time.Since(lastProbeTime.Time)
timeSinceLastProbe := time.Since(lastUpdatedTime.Time)
if timeSinceLastProbe > maxDuration {
err := fmt.Errorf("%s: %s", ErrMsgClusterConnectionLastProbeTimeExceeded, maxDuration.String())
logger.Error(err, fmt.Sprintf("the last probe for %s happened before: %s, see: %+v", toolchainCluster.Name, timeSinceLastProbe.String(), toolchainCluster.ClusterStatus))
Expand Down
20 changes: 9 additions & 11 deletions pkg/status/toolchaincluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ import (

var fakeToolchainClusterReason = "AToolchainClusterReason"
var fakeToolchainClusterMsg = "AToolchainClusterMsg"
var probtime = metav1.Now()
var probtime1 = metav1.NewTime(metav1.Now().Add(time.Duration(-10) * time.Minute))
var updatetime = metav1.NewTime(metav1.Now().Add(time.Duration(-3) * time.Second))
var updatetime1 = metav1.NewTime(metav1.Now().Add(time.Duration(-10) * time.Minute))
var updatetime = metav1.Now()
var log = logf.Log.WithName("toolchaincluster_test")

func TestGetToolchainClusterConditions(t *testing.T) {
Expand Down Expand Up @@ -177,29 +176,29 @@ func TestGetToolchainClusterConditions(t *testing.T) {
}

func newGetHostClusterReady() cluster.GetHostClusterFunc {
return NewFakeGetHostCluster(true, toolchainv1alpha1.ToolchainClusterReady, corev1.ConditionTrue, probtime1, fakeToolchainClusterReason, "", &updatetime)
return NewFakeGetHostCluster(true, toolchainv1alpha1.ConditionReady, corev1.ConditionTrue, fakeToolchainClusterReason, "", &updatetime)
}

func newGetHostClusterNotOk() cluster.GetHostClusterFunc {
return NewFakeGetHostCluster(false, toolchainv1alpha1.ToolchainClusterReady, corev1.ConditionFalse, probtime, fakeToolchainClusterReason, fakeToolchainClusterMsg, nil)
return NewFakeGetHostCluster(false, toolchainv1alpha1.ConditionReady, corev1.ConditionFalse, fakeToolchainClusterReason, fakeToolchainClusterMsg, &updatetime)
}

func newGetHostClusterOkButNotReady(message string) cluster.GetHostClusterFunc {
return NewFakeGetHostCluster(true, toolchainv1alpha1.ToolchainClusterReady, corev1.ConditionFalse, probtime, fakeToolchainClusterReason, message, nil)
return NewFakeGetHostCluster(true, toolchainv1alpha1.ConditionReady, corev1.ConditionFalse, fakeToolchainClusterReason, message, &updatetime)
}

func newGetHostClusterOkWithClusterOfflineCondition() cluster.GetHostClusterFunc {
return NewFakeGetHostCluster(true, toolchainv1alpha1.ToolchainClusterOffline, corev1.ConditionFalse, probtime, fakeToolchainClusterReason, fakeToolchainClusterMsg, nil)
return NewFakeGetHostCluster(true, toolchainv1alpha1.ToolchainClusterOffline, corev1.ConditionFalse, fakeToolchainClusterReason, fakeToolchainClusterMsg, &updatetime)
}

func newGetHostClusterLastProbeTimeExceeded() cluster.GetHostClusterFunc {
return NewFakeGetHostCluster(true, toolchainv1alpha1.ToolchainClusterReady, corev1.ConditionTrue, probtime1, fakeToolchainClusterReason, fakeToolchainClusterMsg, nil)
return NewFakeGetHostCluster(true, toolchainv1alpha1.ConditionReady, corev1.ConditionTrue, fakeToolchainClusterReason, fakeToolchainClusterMsg, &updatetime1)
}

// NewGetHostCluster returns cluster.GetHostClusterFunc function. The cluster.CachedToolchainCluster
// that is returned by the function then contains the given client and the given status and lastProbeTime.
// If ok == false, then the function returns nil for the cluster.
func NewFakeGetHostCluster(ok bool, conditionType toolchainv1alpha1.ToolchainClusterConditionType, status corev1.ConditionStatus, lastProbeTime metav1.Time, reason, message string, lastUpdatedTime *metav1.Time) cluster.GetHostClusterFunc {
func NewFakeGetHostCluster(ok bool, conditionType toolchainv1alpha1.ConditionType, status corev1.ConditionStatus, reason, message string, lastUpdatedTime *metav1.Time) cluster.GetHostClusterFunc {
if !ok {
return func() (*cluster.CachedToolchainCluster, bool) {
return nil, false
Expand All @@ -212,11 +211,10 @@ func NewFakeGetHostCluster(ok bool, conditionType toolchainv1alpha1.ToolchainClu
OwnerClusterName: test.MemberClusterName,
},
ClusterStatus: &toolchainv1alpha1.ToolchainClusterStatus{
Conditions: []toolchainv1alpha1.ToolchainClusterCondition{{
Conditions: []toolchainv1alpha1.Condition{{
Type: conditionType,
Reason: reason,
Status: status,
LastProbeTime: lastProbeTime,
LastUpdatedTime: lastUpdatedTime,
}},
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/test/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
}, secret
}

func NewClusterStatus(conType toolchainv1alpha1.ToolchainClusterConditionType, conStatus corev1.ConditionStatus) toolchainv1alpha1.ToolchainClusterStatus {
func NewClusterStatus(conType toolchainv1alpha1.ConditionType, conStatus corev1.ConditionStatus) toolchainv1alpha1.ToolchainClusterStatus {

Check warning on line 53 in pkg/test/cluster.go

View check run for this annotation

Codecov / codecov/patch

pkg/test/cluster.go#L53

Added line #L53 was not covered by tests
return toolchainv1alpha1.ToolchainClusterStatus{
Conditions: []toolchainv1alpha1.ToolchainClusterCondition{{
Conditions: []toolchainv1alpha1.Condition{{

Check warning on line 55 in pkg/test/cluster.go

View check run for this annotation

Codecov / codecov/patch

pkg/test/cluster.go#L55

Added line #L55 was not covered by tests
Type: conType,
Status: conStatus,
}},
Expand Down
Loading
Loading