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
Context("Backport of cluster/namespace-scoped RBAC tests to 0.0.3", func() {
299
+
300
+
namespaceScopedParam:=false
301
+
302
+
var (
303
+
k8sClient client.Client
304
+
ctx context.Context
305
+
rolloutManager rmv1alpha1.RolloutManager
306
+
)
307
+
308
+
BeforeEach(func() {
309
+
Expect(fixture.EnsureCleanSlate()).To(Succeed())
310
+
311
+
varerrerror
312
+
k8sClient, _, err=fixture.GetE2ETestKubeClient()
313
+
Expect(err).ToNot(HaveOccurred())
314
+
ctx=context.Background()
315
+
316
+
rolloutManager= rmv1alpha1.RolloutManager{
317
+
ObjectMeta: metav1.ObjectMeta{
318
+
Name: "basic-rollouts-manager",
319
+
Namespace: fixture.TestE2ENamespace,
320
+
},
321
+
Spec: rmv1alpha1.RolloutManagerSpec{
322
+
NamespaceScoped: namespaceScopedParam,
323
+
},
324
+
}
325
+
})
326
+
327
+
When("a namespace-scoped RolloutManager is installed into a namespace that previously contained a cluster-scoped RolloutManager, or vice versa", func() {
328
+
329
+
It("should cleanup any cluster/role/rolebinding resources that are present in the namespace, that do not match the current .spec.namespaceScoped value of the RolloutManager CR", func() {
Context("Backport of cluster/namespace-scoped RBAC tests to 0.0.3", func() {
352
+
353
+
namespaceScopedParam:=true
354
+
355
+
var (
356
+
k8sClient client.Client
357
+
ctx context.Context
358
+
rolloutManager rmv1alpha1.RolloutManager
359
+
)
360
+
361
+
BeforeEach(func() {
362
+
Expect(fixture.EnsureCleanSlate()).To(Succeed())
363
+
364
+
varerrerror
365
+
k8sClient, _, err=fixture.GetE2ETestKubeClient()
366
+
Expect(err).ToNot(HaveOccurred())
367
+
ctx=context.Background()
368
+
369
+
rolloutManager= rmv1alpha1.RolloutManager{
370
+
ObjectMeta: metav1.ObjectMeta{
371
+
Name: "basic-rollouts-manager",
372
+
Namespace: fixture.TestE2ENamespace,
373
+
},
374
+
Spec: rmv1alpha1.RolloutManagerSpec{
375
+
NamespaceScoped: namespaceScopedParam,
376
+
},
377
+
}
378
+
})
379
+
380
+
When("a namespace-scoped RolloutManager is installed into a namespace that previously contained a cluster-scoped RolloutManager, or vice versa", func() {
381
+
382
+
It("should cleanup any cluster/role/rolebinding resources that are present in the namespace, that do not match the current .spec.namespaceScoped value of the RolloutManager CR", func() {
0 commit comments