Skip to content

Commit 04b3442

Browse files
committed
fix e2e cases when cluster not found
1 parent 634329b commit 04b3442

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

providers/kubeconfig/provider_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import (
4343

4444
mcbuilder "sigs.k8s.io/multicluster-runtime/pkg/builder"
4545
mcmanager "sigs.k8s.io/multicluster-runtime/pkg/manager"
46+
mcluster "sigs.k8s.io/multicluster-runtime/pkg/multicluster"
4647
mcreconcile "sigs.k8s.io/multicluster-runtime/pkg/reconcile"
4748

4849
. "github.com/onsi/ginkgo/v2"
@@ -445,7 +446,7 @@ var _ = Describe("Provider race condition", func() {
445446
case 1:
446447
// Concurrently get a cluster.
447448
_, err := p.Get(context.Background(), "cluster-1")
448-
Expect(err).To(Or(BeNil(), MatchError("cluster cluster-1 not found")))
449+
Expect(err).To(Or(BeNil(), MatchError(mcluster.ErrClusterNotFound)))
449450
case 2:
450451
// Concurrently list clusters.
451452
p.ListClusters()

0 commit comments

Comments
 (0)