summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-10-26 12:15:25 +0000
committerGerrit Code Review <review@openstack.org>2016-10-26 12:15:25 +0000
commit0e0fe2f4fd3c613094602399f040054534f3998b (patch)
tree2cad6879ad1a6390f5f5754686fae07a86d91191
parentf5ffd8653c24f95580820a622b61de76ee5dd997 (diff)
parentc60b9e3bb7a740f433d4da516e7f4717ad2fbf8f (diff)
Merge "Rollout a daemonset using updateStrategy type: RollingUpdate"
-rw-r--r--fuel_ccp_tests/tests/system/test_daemonsets.py51
1 files changed, 51 insertions, 0 deletions
diff --git a/fuel_ccp_tests/tests/system/test_daemonsets.py b/fuel_ccp_tests/tests/system/test_daemonsets.py
index bfb321c..33d13ed 100644
--- a/fuel_ccp_tests/tests/system/test_daemonsets.py
+++ b/fuel_ccp_tests/tests/system/test_daemonsets.py
@@ -270,3 +270,54 @@ class TestDaemonsetsUpdates():
270 k8sclient, 270 k8sclient,
271 self.to_nginx_image), 271 self.to_nginx_image),
272 timeout=2 * 60) 272 timeout=2 * 60)
273
274 @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
275 @pytest.mark.fail_snapshot
276 @pytest.mark.snapshot_needed
277 def test_daemonset_rollout_rollingupdate(self, underlay,
278 k8scluster, config, show_step):
279 """Rollback a daemonset using updateStrategy type: RollingUpdate
280
281 Scenario:
282 1. Deploy k8s using fuel-ccp-installer
283 2. Create a DaemonSet for nginx with image version 1_10 and
284 update strategy RollingUpdate
285 3. Wait until nginx pods are created and become 'ready'
286 4. Check that the image version in the nginx pods is 1_10
287 Check that the image version in the nginx daemonset is 1_10
288 5. Change nginx image version to 1_11 using YAML
289 6. Wait for 10 seconds (needs to check that there were
290 no auto updates of the nginx pods)
291 7. Check that the image version in the nginx daemonset
292 is updated to 1_11
293 Wait for ~120 sec that the image version
294 in the nginx pods is changed to 1_11
295 8. Rollback the nginx daemonset:
296 kubectl rollout undo daemonset/nginx
297 9. Check that the image version in the nginx daemonset is
298 downgraded to 1_10
299 Wait for ~120 sec that the image version
300 in the nginx pods is downgraded to 1_10
301
302 Duration: 3000 seconds
303 """
304
305 self.test_daemonset_rollingupdate(k8scluster, show_step)
306
307 k8sclient = k8scluster.api
308
309 show_step(8)
310 cmd = "kubectl rollout undo daemonset/nginx"
311 underlay.check_call(cmd,
312 host=config.k8s.kube_host)
313
314 # STEP #9
315 show_step(9)
316 self.check_nginx_ds_image(k8sclient, self.from_nginx_image)
317 # Pods should have new image version
318 helpers.wait_pass(
319 lambda: self.check_nginx_pods_image(
320 k8sclient,
321 self.from_nginx_image),
322 timeout=2 * 60
323 )