Skip to content

Commit

Permalink
Don't check for the cluster role label. It was only set by the test code
Browse files Browse the repository at this point in the history
anyway.
  • Loading branch information
metlos committed Sep 3, 2024
1 parent 0381211 commit 4775567
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions pkg/test/verify/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ func AddToolchainClusterAsMember(t *testing.T, functionToVerify FunctionToVerify
cachedToolchainCluster, ok := cluster.GetCachedToolchainCluster("east")
require.True(t, ok)
assert.Equal(t, "member-ns", cachedToolchainCluster.OperatorNamespace)
// check that toolchain cluster role label tenant was set only on member cluster type
require.NoError(t, cl.Get(context.TODO(), client.ObjectKeyFromObject(toolchainCluster), toolchainCluster))
_, found := toolchainCluster.Labels[cluster.RoleLabel(cluster.Tenant)]
require.True(t, found)
assert.Equal(t, status, *cachedToolchainCluster.ClusterStatus)
assert.Equal(t, "https://cluster.com", cachedToolchainCluster.APIEndpoint)
}
Expand All @@ -65,11 +62,7 @@ func AddToolchainClusterAsHost(t *testing.T, functionToVerify FunctionToVerify)

assert.Equal(t, "host-ns", cachedToolchainCluster.OperatorNamespace)

// check that toolchain cluster role label tenant is not set on host cluster
require.NoError(t, cl.Get(context.TODO(), client.ObjectKeyFromObject(toolchainCluster), toolchainCluster))
expectedToolChainClusterRoleLabel := cluster.RoleLabel(cluster.Tenant)
_, found := toolchainCluster.Labels[expectedToolChainClusterRoleLabel]
require.False(t, found)
assert.Equal(t, status, *cachedToolchainCluster.ClusterStatus)
assert.Equal(t, "https://cluster.com", cachedToolchainCluster.APIEndpoint)
}
Expand Down

0 comments on commit 4775567

Please sign in to comment.