@@ -12,23 +12,23 @@ class DeploymentTest extends TestCase
1212{
1313 public function test_deployment_build ()
1414 {
15- $ mysql = $ this ->createMysqlContainer ();
15+ $ mariadb = $ this ->createMariadbContainer ();
1616
1717 $ pod = $ this ->cluster ->pod ()
18- ->setName ('mysql ' )
19- ->setContainers ([$ mysql ]);
18+ ->setName ('mariadb ' )
19+ ->setContainers ([$ mariadb ]);
2020
2121 $ dep = $ this ->cluster ->deployment ()
22- ->setName ('mysql ' )
22+ ->setName ('mariadb ' )
2323 ->setLabels (['tier ' => 'backend ' ])
24- ->setAnnotations (['mysql /annotation ' => 'yes ' ])
24+ ->setAnnotations (['mariadb /annotation ' => 'yes ' ])
2525 ->setReplicas (3 )
2626 ->setTemplate ($ pod );
2727
2828 $ this ->assertEquals ('apps/v1 ' , $ dep ->getApiVersion ());
29- $ this ->assertEquals ('mysql ' , $ dep ->getName ());
29+ $ this ->assertEquals ('mariadb ' , $ dep ->getName ());
3030 $ this ->assertEquals (['tier ' => 'backend ' ], $ dep ->getLabels ());
31- $ this ->assertEquals (['mysql /annotation ' => 'yes ' ], $ dep ->getAnnotations ());
31+ $ this ->assertEquals (['mariadb /annotation ' => 'yes ' ], $ dep ->getAnnotations ());
3232 $ this ->assertEquals (3 , $ dep ->getReplicas ());
3333 $ this ->assertEquals ($ pod ->getName (), $ dep ->getTemplate ()->getName ());
3434
@@ -37,18 +37,18 @@ public function test_deployment_build()
3737
3838 public function test_deployment_from_yaml ()
3939 {
40- $ mysql = $ this ->createMysqlContainer ();
40+ $ mariadb = $ this ->createMariadbContainer ();
4141
4242 $ pod = $ this ->cluster ->pod ()
43- ->setName ('mysql ' )
44- ->setContainers ([$ mysql ]);
43+ ->setName ('mariadb ' )
44+ ->setContainers ([$ mariadb ]);
4545
4646 $ dep = $ this ->cluster ->fromYamlFile (__DIR__ .'/yaml/deployment.yaml ' );
4747
4848 $ this ->assertEquals ('apps/v1 ' , $ dep ->getApiVersion ());
49- $ this ->assertEquals ('mysql ' , $ dep ->getName ());
49+ $ this ->assertEquals ('mariadb ' , $ dep ->getName ());
5050 $ this ->assertEquals (['tier ' => 'backend ' ], $ dep ->getLabels ());
51- $ this ->assertEquals (['mysql /annotation ' => 'yes ' ], $ dep ->getAnnotations ());
51+ $ this ->assertEquals (['mariadb /annotation ' => 'yes ' ], $ dep ->getAnnotations ());
5252 $ this ->assertEquals (3 , $ dep ->getReplicas ());
5353 $ this ->assertEquals ($ pod ->getName (), $ dep ->getTemplate ()->getName ());
5454
@@ -70,24 +70,24 @@ public function test_deployment_api_interaction()
7070
7171 public function runCreationTests ()
7272 {
73- $ mysql = $ this ->createMysqlContainer ([
73+ $ mariadb = $ this ->createMariadbContainer ([
7474 'includeEnv ' => true ,
7575 'additionalPort ' => 3307
7676 ]);
7777
78- $ pod = $ this ->createMysqlPod ([
79- 'labels ' => ['tier ' => 'backend ' , 'deployment-name ' => 'mysql ' ],
78+ $ pod = $ this ->createMariadbPod ([
79+ 'labels ' => ['tier ' => 'backend ' , 'deployment-name ' => 'mariadb ' ],
8080 'container ' => [
8181 'includeEnv ' => true ,
8282 'additionalPort ' => 3307
8383 ]
8484 ])
85- ->setAnnotations (['mysql /annotation ' => 'yes ' ]);
85+ ->setAnnotations (['mariadb /annotation ' => 'yes ' ]);
8686
8787 $ dep = $ this ->cluster ->deployment ()
88- ->setName ('mysql ' )
88+ ->setName ('mariadb ' )
8989 ->setLabels (['tier ' => 'backend ' ])
90- ->setAnnotations (['mysql /annotation ' => 'yes ' ])
90+ ->setAnnotations (['mariadb /annotation ' => 'yes ' ])
9191 ->setSelectors (['matchLabels ' => ['tier ' => 'backend ' ]])
9292 ->setReplicas (1 )
9393 ->setUpdateStrategy ('RollingUpdate ' )
@@ -105,9 +105,9 @@ public function runCreationTests()
105105 $ this ->assertInstanceOf (K8sDeployment::class, $ dep );
106106
107107 $ this ->assertEquals ('apps/v1 ' , $ dep ->getApiVersion ());
108- $ this ->assertEquals ('mysql ' , $ dep ->getName ());
108+ $ this ->assertEquals ('mariadb ' , $ dep ->getName ());
109109 $ this ->assertEquals (['tier ' => 'backend ' ], $ dep ->getLabels ());
110- $ this ->assertEquals (['mysql /annotation ' => 'yes ' ], $ dep ->getAnnotations ());
110+ $ this ->assertEquals (['mariadb /annotation ' => 'yes ' ], $ dep ->getAnnotations ());
111111 $ this ->assertEquals (1 , $ dep ->getReplicas ());
112112 $ this ->assertEquals (0 , $ dep ->getMinReadySeconds ());
113113 $ this ->assertEquals ($ pod ->getName (), $ dep ->getTemplate ()->getName ());
@@ -168,29 +168,29 @@ public function runGetAllTests()
168168
169169 public function runGetTests ()
170170 {
171- $ dep = $ this ->cluster ->getDeploymentByName ('mysql ' );
171+ $ dep = $ this ->cluster ->getDeploymentByName ('mariadb ' );
172172
173173 $ this ->assertInstanceOf (K8sDeployment::class, $ dep );
174174
175175 $ this ->assertTrue ($ dep ->isSynced ());
176176
177177 $ this ->assertEquals ('apps/v1 ' , $ dep ->getApiVersion ());
178- $ this ->assertEquals ('mysql ' , $ dep ->getName ());
178+ $ this ->assertEquals ('mariadb ' , $ dep ->getName ());
179179 $ this ->assertEquals (['tier ' => 'backend ' ], $ dep ->getLabels ());
180- $ this ->assertEquals (['mysql /annotation ' => 'yes ' , 'deployment.kubernetes.io/revision ' => '1 ' ], $ dep ->getAnnotations ());
180+ $ this ->assertEquals (['mariadb /annotation ' => 'yes ' , 'deployment.kubernetes.io/revision ' => '1 ' ], $ dep ->getAnnotations ());
181181 $ this ->assertEquals (1 , $ dep ->getReplicas ());
182182
183183 $ this ->assertInstanceOf (K8sPod::class, $ dep ->getTemplate ());
184184 }
185185
186186 public function attachPodAutoscaler ()
187187 {
188- $ dep = $ this ->cluster ->getDeploymentByName ('mysql ' );
188+ $ dep = $ this ->cluster ->getDeploymentByName ('mariadb ' );
189189
190190 $ cpuMetric = K8s::metric ()->cpu ()->averageUtilization (70 );
191191
192192 $ hpa = $ this ->cluster ->horizontalPodAutoscaler ()
193- ->setName ('deploy-mysql ' )
193+ ->setName ('deploy-mariadb ' )
194194 ->setResource ($ dep )
195195 ->addMetrics ([$ cpuMetric ])
196196 ->setMetrics ([$ cpuMetric ])
@@ -209,7 +209,7 @@ public function attachPodAutoscaler()
209209
210210 public function runUpdateTests ()
211211 {
212- $ dep = $ this ->cluster ->getDeploymentByName ('mysql ' );
212+ $ dep = $ this ->cluster ->getDeploymentByName ('mariadb ' );
213213
214214 $ this ->assertTrue ($ dep ->isSynced ());
215215
@@ -220,7 +220,7 @@ public function runUpdateTests()
220220 $ this ->assertTrue ($ dep ->isSynced ());
221221
222222 $ this ->assertEquals ('apps/v1 ' , $ dep ->getApiVersion ());
223- $ this ->assertEquals ('mysql ' , $ dep ->getName ());
223+ $ this ->assertEquals ('mariadb ' , $ dep ->getName ());
224224 $ this ->assertEquals (['tier ' => 'backend ' ], $ dep ->getLabels ());
225225 $ this ->assertEquals ([], $ dep ->getAnnotations ());
226226 $ this ->assertEquals (2 , $ dep ->getReplicas ());
@@ -230,8 +230,8 @@ public function runUpdateTests()
230230
231231 public function runDeletionTests ()
232232 {
233- $ dep = $ this ->cluster ->getDeploymentByName ('mysql ' );
234- $ hpa = $ this ->cluster ->getHorizontalPodAutoscalerByName ('deploy-mysql ' );
233+ $ dep = $ this ->cluster ->getDeploymentByName ('mariadb ' );
234+ $ hpa = $ this ->cluster ->getHorizontalPodAutoscalerByName ('deploy-mariadb ' );
235235
236236 $ this ->assertTrue ($ dep ->delete ());
237237 $ this ->assertTrue ($ hpa ->delete ());
@@ -253,14 +253,14 @@ public function runDeletionTests()
253253
254254 $ this ->expectException (KubernetesAPIException::class);
255255
256- $ this ->cluster ->getDeploymentByName ('mysql ' );
257- $ this ->cluster ->getHorizontalPodAutoscalerByName ('deploy-mysql ' );
256+ $ this ->cluster ->getDeploymentByName ('mariadb ' );
257+ $ this ->cluster ->getHorizontalPodAutoscalerByName ('deploy-mariadb ' );
258258 }
259259
260260 public function runWatchAllTests ()
261261 {
262262 $ watch = $ this ->cluster ->deployment ()->watchAll (function ($ type , $ dep ) {
263- if ($ dep ->getName () === 'mysql ' ) {
263+ if ($ dep ->getName () === 'mariadb ' ) {
264264 return true ;
265265 }
266266 }, ['timeoutSeconds ' => 10 ]);
@@ -270,16 +270,16 @@ public function runWatchAllTests()
270270
271271 public function runWatchTests ()
272272 {
273- $ watch = $ this ->cluster ->deployment ()->watchByName ('mysql ' , function ($ type , $ dep ) {
274- return $ dep ->getName () === 'mysql ' ;
273+ $ watch = $ this ->cluster ->deployment ()->watchByName ('mariadb ' , function ($ type , $ dep ) {
274+ return $ dep ->getName () === 'mariadb ' ;
275275 }, ['timeoutSeconds ' => 10 ]);
276276
277277 $ this ->assertTrue ($ watch );
278278 }
279279
280280 public function runScalingTests ()
281281 {
282- $ dep = $ this ->cluster ->getDeploymentByName ('mysql ' );
282+ $ dep = $ this ->cluster ->getDeploymentByName ('mariadb ' );
283283
284284 $ scaler = $ dep ->scale (2 );
285285
0 commit comments