summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-10-26 12:15:35 +0000
committerGerrit Code Review <review@openstack.org>2016-10-26 12:15:36 +0000
commit6466a5d08be7b871fdcf0d18907b01014b8120ab (patch)
tree0da9ca4346587e16fa500bd9149023ccfab5ef68
parentd0464e126ef4c94dd130d9de23f4c58f7efb3778 (diff)
parent9dae0cd4a5355934c9a9804b857897268c8a63f1 (diff)
Merge "Rollout multiple times a daemonset using updateStrategy type: RollingUpdate"
-rw-r--r--fuel_ccp_tests/tests/system/test_daemonsets.py82
1 files changed, 82 insertions, 0 deletions
diff --git a/fuel_ccp_tests/tests/system/test_daemonsets.py b/fuel_ccp_tests/tests/system/test_daemonsets.py
index f9682ed..069da2e 100644
--- a/fuel_ccp_tests/tests/system/test_daemonsets.py
+++ b/fuel_ccp_tests/tests/system/test_daemonsets.py
@@ -389,3 +389,85 @@ class TestDaemonsetsUpdates():
389 show_step(15) 389 show_step(15)
390 # Pods should have the old image version 390 # Pods should have the old image version
391 self.check_nginx_pods_image(k8sclient, self.from_nginx_image) 391 self.check_nginx_pods_image(k8sclient, self.from_nginx_image)
392
393 @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
394 @pytest.mark.fail_snapshot
395 @pytest.mark.snapshot_needed
396 def test_daemonset_multirollout_rollingupdate(self, underlay, k8scluster,
397 config, show_step):
398 """Rollback multiple times a daemonset using updateStrategy type:
399 RollingUpdate
400
401 Scenario:
402 1. Deploy k8s using fuel-ccp-installer
403 2. Create a DaemonSet for nginx with image version 1_10 and
404 update strategy RollingUpdate
405 3. Wait until nginx pods are created and become 'ready'
406 4. Check that the image version in the nginx pods is 1_10
407 Check that the image version in the nginx daemonset is 1_10
408 5. Change nginx image version to 1_11 using YAML
409 6. Wait for 10 seconds (needs to check that there were
410 no auto updates of the nginx pods)
411 7. Check that the image version in the nginx daemonset
412 is updated to 1_11
413 Wait for ~120 sec that the image version
414 in the nginx pods is changed to 1_11
415 8. Rollback the nginx daemonset:
416 kubectl rollout undo daemonset/nginx
417 9. Check that the image version in the nginx daemonset is
418 downgraded to 1_10
419 Wait for ~120 sec that the image version
420 in the nginx pods is downgraded to 1_10
421 10. Rollback the nginx daemonset:
422 kubectl rollout undo daemonset/nginx
423 11. Check that the image version in the nginx daemonset
424 is updated to 1_11
425 Wait for ~120 sec that the image version
426 in the nginx pods is changed to 1_11
427 12. Rollback the nginx daemonset:
428 kubectl rollout undo daemonset/nginx
429 13. Check that the image version in the nginx daemonset is
430 downgraded to 1_10
431 Wait for ~120 sec that the image version
432 in the nginx pods is downgraded to 1_10
433
434 Duration: 3000 seconds
435 """
436
437 self.test_daemonset_rollout_rollingupdate(underlay, k8scluster,
438 config, show_step)
439 k8sclient = k8scluster.api
440
441 # STEP #10
442 show_step(10)
443 cmd = "kubectl rollout undo daemonset/nginx"
444 underlay.check_call(cmd,
445 host=config.k8s.kube_host)
446
447 # STEP #11
448 show_step(11)
449 self.check_nginx_ds_image(k8sclient, self.to_nginx_image)
450 # Pods should have new image version
451 helpers.wait_pass(
452 lambda: self.check_nginx_pods_image(
453 k8sclient,
454 self.to_nginx_image),
455 timeout=2 * 60
456 )
457
458 # STEP #12
459 show_step(12)
460 cmd = "kubectl rollout undo daemonset/nginx"
461 underlay.check_call(cmd,
462 host=config.k8s.kube_host)
463
464 # STEP #13
465 show_step(13)
466 self.check_nginx_ds_image(k8sclient, self.from_nginx_image)
467 # Pods should have new image version
468 helpers.wait_pass(
469 lambda: self.check_nginx_pods_image(
470 k8sclient,
471 self.from_nginx_image),
472 timeout=2 * 60
473 )