@@ -19,7 +19,7 @@ public function test_cluster_role_binding_build()
1919 ->addVerbs (['get ' , 'list ' , 'watch ' ]);
2020
2121 $ cr = $ this ->cluster ->clusterRole ()
22- ->setName ('admin-cr ' )
22+ ->setName ('admin-cr-for-binding ' )
2323 ->setLabels (['tier ' => 'backend ' ])
2424 ->addRules ([$ rule ]);
2525
@@ -39,7 +39,7 @@ public function test_cluster_role_binding_build()
3939 $ this ->assertEquals ('user-binding ' , $ crb ->getName ());
4040 $ this ->assertEquals (['tier ' => 'backend ' ], $ crb ->getLabels ());
4141 $ this ->assertEquals ([$ subject ], $ crb ->getSubjects ());
42- $ this ->assertEquals (['apiGroup ' => 'rbac.authorization.k8s.io ' , 'kind ' => 'ClusterRole ' , 'name ' => 'admin-cr ' ], $ crb ->getRole ());
42+ $ this ->assertEquals (['apiGroup ' => 'rbac.authorization.k8s.io ' , 'kind ' => 'ClusterRole ' , 'name ' => 'admin-cr-for-binding ' ], $ crb ->getRole ());
4343 }
4444
4545 public function test_cluster_role_binding_from_yaml ()
@@ -51,7 +51,7 @@ public function test_cluster_role_binding_from_yaml()
5151 ->addVerbs (['get ' , 'list ' , 'watch ' ]);
5252
5353 $ cr = $ this ->cluster ->clusterRole ()
54- ->setName ('admin-cr ' )
54+ ->setName ('admin-cr-for-binding ' )
5555 ->setLabels (['tier ' => 'backend ' ])
5656 ->addRules ([$ rule ]);
5757
@@ -66,7 +66,7 @@ public function test_cluster_role_binding_from_yaml()
6666 $ this ->assertEquals ('user-binding ' , $ crb ->getName ());
6767 $ this ->assertEquals (['tier ' => 'backend ' ], $ crb ->getLabels ());
6868 $ this ->assertEquals ([$ subject ], $ crb ->getSubjects ());
69- $ this ->assertEquals (['apiGroup ' => 'rbac.authorization.k8s.io ' , 'kind ' => 'ClusterRole ' , 'name ' => 'admin-cr ' ], $ crb ->getRole ());
69+ $ this ->assertEquals (['apiGroup ' => 'rbac.authorization.k8s.io ' , 'kind ' => 'ClusterRole ' , 'name ' => 'admin-cr-for-binding ' ], $ crb ->getRole ());
7070 }
7171
7272 public function test_cluster_role_binding_api_interaction ()
@@ -89,7 +89,7 @@ public function runCreationTests()
8989 ->addVerbs (['get ' , 'list ' , 'watch ' ]);
9090
9191 $ cr = $ this ->cluster ->clusterRole ()
92- ->setName ('admin-cr ' )
92+ ->setName ('admin-cr-for-binding ' )
9393 ->setLabels (['tier ' => 'backend ' ])
9494 ->addRules ([$ rule ]);
9595
@@ -120,7 +120,7 @@ public function runCreationTests()
120120 $ this ->assertEquals ('user-binding ' , $ crb ->getName ());
121121 $ this ->assertEquals (['tier ' => 'backend ' ], $ crb ->getLabels ());
122122 $ this ->assertEquals ([$ subject ], $ crb ->getSubjects ());
123- $ this ->assertEquals (['apiGroup ' => 'rbac.authorization.k8s.io ' , 'kind ' => 'ClusterRole ' , 'name ' => 'admin-cr ' ], $ crb ->getRole ());
123+ $ this ->assertEquals (['apiGroup ' => 'rbac.authorization.k8s.io ' , 'kind ' => 'ClusterRole ' , 'name ' => 'admin-cr-for-binding ' ], $ crb ->getRole ());
124124 }
125125
126126 public function runGetAllTests ()
@@ -143,7 +143,7 @@ public function runGetTests()
143143 ->setKind ('User ' )
144144 ->setName ('user-1 ' );
145145
146- $ cr = $ this ->cluster ->getClusterRoleByName ('admin-cr ' );
146+ $ cr = $ this ->cluster ->getClusterRoleByName ('admin-cr-for-binding ' );
147147 $ crb = $ this ->cluster ->getClusterRoleBindingByName ('user-binding ' );
148148
149149 $ this ->assertInstanceOf (K8sClusterRoleBinding::class, $ crb );
@@ -154,12 +154,12 @@ public function runGetTests()
154154 $ this ->assertEquals ('user-binding ' , $ crb ->getName ());
155155 $ this ->assertEquals (['tier ' => 'backend ' ], $ crb ->getLabels ());
156156 $ this ->assertEquals ([$ subject ], $ crb ->getSubjects ());
157- $ this ->assertEquals (['apiGroup ' => 'rbac.authorization.k8s.io ' , 'kind ' => 'ClusterRole ' , 'name ' => 'admin-cr ' ], $ crb ->getRole ());
157+ $ this ->assertEquals (['apiGroup ' => 'rbac.authorization.k8s.io ' , 'kind ' => 'ClusterRole ' , 'name ' => 'admin-cr-for-binding ' ], $ crb ->getRole ());
158158 }
159159
160160 public function runUpdateTests ()
161161 {
162- $ cr = $ this ->cluster ->getClusterRoleByName ('admin-cr ' );
162+ $ cr = $ this ->cluster ->getClusterRoleByName ('admin-cr-for-binding ' );
163163 $ crb = $ this ->cluster ->getClusterRoleBindingByName ('user-binding ' );
164164
165165 $ subject = K8s::subject ()
@@ -179,12 +179,12 @@ public function runUpdateTests()
179179 $ this ->assertEquals ('user-binding ' , $ crb ->getName ());
180180 $ this ->assertEquals (['tier ' => 'backend ' ], $ crb ->getLabels ());
181181 $ this ->assertEquals ([$ subject ], $ crb ->getSubjects ());
182- $ this ->assertEquals (['apiGroup ' => 'rbac.authorization.k8s.io ' , 'kind ' => 'ClusterRole ' , 'name ' => 'admin-cr ' ], $ crb ->getRole ());
182+ $ this ->assertEquals (['apiGroup ' => 'rbac.authorization.k8s.io ' , 'kind ' => 'ClusterRole ' , 'name ' => 'admin-cr-for-binding ' ], $ crb ->getRole ());
183183 }
184184
185185 public function runDeletionTests ()
186186 {
187- $ cr = $ this ->cluster ->getClusterRoleByName ('admin-cr ' );
187+ $ cr = $ this ->cluster ->getClusterRoleByName ('admin-cr-for-binding ' );
188188 $ crb = $ this ->cluster ->getClusterRoleBindingByName ('user-binding ' );
189189
190190 $ this ->assertTrue ($ cr ->delete ());
@@ -200,7 +200,7 @@ public function runDeletionTests()
200200
201201 $ this ->expectException (KubernetesAPIException::class);
202202
203- $ this ->cluster ->getClusterRoleByName ('admin-cr ' );
203+ $ this ->cluster ->getClusterRoleByName ('admin-cr-for-binding ' );
204204 $ this ->cluster ->getClusterRoleBindingByName ('user-binding ' );
205205 }
206206
0 commit comments