Skip to content

Commit

Permalink
Use non-managed downstream cluster in multi-cluster label tests
Browse files Browse the repository at this point in the history
This makes the multi-cluster end-to-end test suite compatible with
setups in which only one, non-managed downstream cluster exists, such as
the test-Fleet-in-Rancher CI workflow.
  • Loading branch information
weyfonk committed Nov 13, 2024
1 parent 8a522ce commit 986f182
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/e2e-multicluster-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ jobs:
FLEET_E2E_NS: fleet-local
FLEET_E2E_NS_DOWNSTREAM: fleet-default
run: |
# Force use of non-managed downstream cluster for portability
export CI_REGISTERED_CLUSTER=$(kubectl get clusters.fleet.cattle.io -n $FLEET_E2E_NS_DOWNSTREAM -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}' | grep -v second)
kubectl config use-context k3d-upstream
ginkgo --github-output e2e/multi-cluster
-
Expand Down
2 changes: 1 addition & 1 deletion e2e/multi-cluster/not_matching_targets_delete_bd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var _ = Describe("Target clusters by label", func() {

BeforeEach(func() {
k = env.Kubectl.Context(env.Upstream)
kd = env.Kubectl.Context(env.ManagedDownstream)
kd = env.Kubectl.Context(env.Downstream)
})

JustBeforeEach(func() {
Expand Down

0 comments on commit 986f182

Please sign in to comment.