Skip to content

Commit 7abf042

Browse files
committed
Tests for aggregated cluster roles
1 parent cb31d16 commit 7abf042

File tree

13 files changed

+3192
-70
lines changed

13 files changed

+3192
-70
lines changed

actions/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ replace (
5959

6060
require (
6161
github.com/rancher/rancher/pkg/apis v0.0.0
62-
github.com/rancher/shepherd v0.0.0-20251003203259-669abb78af51
62+
github.com/rancher/shepherd v0.0.0-20251015044355-8c54bf0aaf31
6363
github.com/rancher/tfp-automation v0.0.0-20251016221424-5aafbe545b8e
6464
)
6565

@@ -174,7 +174,7 @@ require (
174174
github.com/rancher/aks-operator v1.12.1 // indirect
175175
github.com/rancher/apiserver v0.7.0 // indirect
176176
github.com/rancher/eks-operator v1.12.1 // indirect
177-
github.com/rancher/fleet/pkg/apis v0.13.0 // indirect
177+
github.com/rancher/fleet/pkg/apis v0.14.0-alpha.3 // indirect
178178
github.com/rancher/gke-operator v1.12.1 // indirect
179179
github.com/rancher/lasso v0.2.3 // indirect
180180
github.com/rancher/rke v1.8.0-rc.4 // indirect

actions/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ github.com/rancher/apiserver v0.7.0 h1:8N9XQXurELdZ3nfU5WKwgwDcYOoixNfpdpMbLZ4rr
248248
github.com/rancher/apiserver v0.7.0/go.mod h1:9b/n58YT7S8bMFEyr1v7xzL72qwZKQQJK2Ir6lMT8Yk=
249249
github.com/rancher/eks-operator v1.12.1 h1:ZsaDyQa1Ykrf9b1Ux11DICIV4JXRy14kWKqE0JfAZg0=
250250
github.com/rancher/eks-operator v1.12.1/go.mod h1:3hz8e7XqekMw/76TShanMS/iMBcQoom2j7/B9nyKbVQ=
251-
github.com/rancher/fleet/pkg/apis v0.13.0 h1:soXF3cKWD9sMRcX5OlVnOY8aoPr+/FF8DP/zZtLLe3g=
252-
github.com/rancher/fleet/pkg/apis v0.13.0/go.mod h1:LpFIRtWNJe6Tf4EGJ/brPtutyTUlFj2hJDso1/5CO7Y=
251+
github.com/rancher/fleet/pkg/apis v0.14.0-alpha.3 h1:SCy+VCww6APf8n9x31sPi/cE6ji9A+uRmS7Qe7I5dVw=
252+
github.com/rancher/fleet/pkg/apis v0.14.0-alpha.3/go.mod h1:l+30BByeNBbo0AF94+pYW4q/g9U2oM0UkQuriR0bOD4=
253253
github.com/rancher/gke-operator v1.12.1 h1:zH2DEQsea+kG61cN0+1NWDQp0FyN28o2XIm5ieRLCKU=
254254
github.com/rancher/gke-operator v1.12.1/go.mod h1:TbOTInXvdC1fPAxj2BHlRIh2j7ezTVQ7eIJW+udz5Xg=
255255
github.com/rancher/lasso v0.2.3 h1:74/z/C/O3ykhyMrRuEgc9kVyYiSoS7kp5BAijlcyXDg=
@@ -262,8 +262,8 @@ github.com/rancher/rancher/pkg/apis v0.0.0-20250806201723-9a7af3779b9d h1:TZd6Wp
262262
github.com/rancher/rancher/pkg/apis v0.0.0-20250806201723-9a7af3779b9d/go.mod h1:IhaOGqACWRoyF+xXpd5CvGt02XeJyDdOC8W3Rdz1cW0=
263263
github.com/rancher/rke v1.8.0-rc.4 h1:jowVyaF3LsJonC7vNsAwWf3MONHAtEFUD/j3UzNSE5U=
264264
github.com/rancher/rke v1.8.0-rc.4/go.mod h1:x9N1abruzDFMwTpqq2cnaDYpKCptlNoW8VraNWB6Pc4=
265-
github.com/rancher/shepherd v0.0.0-20251003203259-669abb78af51 h1:xi4qsdR2UtySDvU3eNk5kbtbCIf7A4oiCmOCGo/KIfM=
266-
github.com/rancher/shepherd v0.0.0-20251003203259-669abb78af51/go.mod h1:BdEW/H1ZkLUn3/A/73pacOSfgh9nn5ITjg5qj02CyS4=
265+
github.com/rancher/shepherd v0.0.0-20251015044355-8c54bf0aaf31 h1:CKxEoFWtmB9tzsDuFDwaOCJm9CxnzBqHEc58xTEUH1w=
266+
github.com/rancher/shepherd v0.0.0-20251015044355-8c54bf0aaf31/go.mod h1:wZ6Oe7Aa9aam77+4t3lBiixw9JpTTaYQ+Adfi0ICcqQ=
267267
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20250710162344-185ff9f785cd h1:M3oVcVktMhNk8l3ZRW94kroqzWzE/VGbZfLw/F0rw5Y=
268268
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20250710162344-185ff9f785cd/go.mod h1:VfRrgue4yl6O0GYakMGYgyByu7ySooPQWWRxTt2MIEI=
269269
github.com/rancher/tfp-automation v0.0.0-20251016221424-5aafbe545b8e h1:4XpRPzt0C9oB0LsFaC0BoBSR16vp1GSLiZPoJR4KHVs=

actions/projects/projects.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,13 @@ func WaitForProjectIDUpdate(client *rancher.Client, clusterID, projectName, name
196196
projectsapi.ProjectIDAnnotation: projectName,
197197
}
198198

199-
err := kwait.PollUntilContextTimeout(context.Background(), defaults.FiveSecondTimeout, defaults.OneMinuteTimeout, false, func(ctx context.Context) (done bool, pollErr error) {
200-
namespace, pollErr := namespaces.GetNamespaceByName(client, clusterID, namespaceName)
199+
downstreamContext, err := clusterapi.GetClusterWranglerContext(client, clusterID)
200+
if err != nil {
201+
return err
202+
}
203+
204+
err = kwait.PollUntilContextTimeout(context.Background(), defaults.FiveSecondTimeout, defaults.OneMinuteTimeout, false, func(ctx context.Context) (done bool, pollErr error) {
205+
namespace, pollErr := downstreamContext.Core.Namespace().Get(namespaceName, metav1.GetOptions{})
201206
if pollErr != nil {
202207
return false, pollErr
203208
}

0 commit comments

Comments
 (0)