mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-02-14 18:09:58 +00:00
test(e2e): support multiple tenant owners(add applications to act as tenant owners)
This commit is contained in:
committed by
Dario Tranchitella
parent
663ce93a3e
commit
db8b8ac1d9
@@ -23,9 +23,11 @@ var _ = Describe("creating several Namespaces for a Tenant", func() {
|
||||
Name: "capsule-labels",
|
||||
},
|
||||
Spec: capsulev1beta1.TenantSpec{
|
||||
Owner: capsulev1beta1.OwnerSpec{
|
||||
Name: "charlie",
|
||||
Kind: "User",
|
||||
Owners: []capsulev1beta1.OwnerSpec{
|
||||
{
|
||||
Name: "charlie",
|
||||
Kind: "User",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -47,7 +49,7 @@ var _ = Describe("creating several Namespaces for a Tenant", func() {
|
||||
NewNamespace("third-capsule-ns"),
|
||||
}
|
||||
for _, ns := range namespaces {
|
||||
NamespaceCreation(ns, tnt, defaultTimeoutInterval).Should(Succeed())
|
||||
NamespaceCreation(ns, tnt.Spec.Owners[0], defaultTimeoutInterval).Should(Succeed())
|
||||
Eventually(func() (ok bool) {
|
||||
Expect(k8sClient.Get(context.TODO(), types.NamespacedName{Name: ns.GetName()}, ns)).Should(Succeed())
|
||||
ok, _ = HaveKeyWithValue("capsule.clastix.io/tenant", tnt.Name).Match(ns.Labels)
|
||||
|
||||
Reference in New Issue
Block a user