You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
t.Logf("Check that the in-workspace webhook was NOT called")
210
213
require.Zero(t, testWebhooks[targetPath].Calls(), "in-workspace webhook should not have been called")
214
+
215
+
t.Logf("Check that the logicalcluster annotation on the object that triggered webhook is matching the target cluster")
216
+
require.Equal(t, targetWS.Spec.Cluster, clusterInReviewObject.Load(), "expected that the object passed to the webhook has correct kcp.io/cluster annotation set")
t.Logf("Check that the in-workspace webhook was NOT called")
378
386
require.Zero(t, testWebhooks[targetPath].Calls(), "in-workspace webhook should not have been called")
387
+
388
+
t.Logf("Check that the logicalcluster annotation on the object that triggered webhook is matching the target cluster")
389
+
require.Equal(t, targetWS.Spec.Cluster, clusterInReviewObject.Load(), "expected that the object passed to the webhook has correct kcp.io/cluster annotation set")
require.Equal(t, workspaces[0].Spec.Cluster, clusterInReviewObject.Load(), "expected that the object passed to the webhook has the kcp.io/cluster annotation set")
280
278
281
279
// Avoid race condition here by making sure that CRD is served after installing the types into logical clusters
282
280
t.Logf("Creating cowboy resource in second logical cluster")
0 commit comments