Exemple #1
0
 def test_retry_false(self):
     """Tests correct behavior when retry is passed as false."""
     seq = [
         (self.update_call.intent, lambda _: (StubResponse(202, ''), None)),
         (Log('request-update-stack', ANY), lambda _: None)
     ]
     update = UpdateStack(stack=self.stack, stack_config=self.config,
                          retry=False)
     result = perform_sequence(seq, update.as_effect())
     self.assertEqual(result, (StepResult.SUCCESS, []))
Exemple #2
0
 def test_retry_default(self):
     """Tests correct behavior when retry is not specified."""
     seq = [
         (self.update_call.intent, lambda _: (StubResponse(202, ''), None)),
         (Log('request-update-stack', ANY), lambda _: None)
     ]
     update = UpdateStack(stack=self.stack, stack_config=self.config)
     reason = 'Waiting for stack to update'
     result = perform_sequence(seq, update.as_effect())
     self.assertEqual(result,
                      (StepResult.RETRY, [ErrorReason.String(reason)]))
Exemple #3
0
 def test_normal_use(self):
     """Tests normal usage."""
     update = UpdateStack(stack=self.stack, stack_config=self.config)
     self.assertEqual(update.as_effect().intent,
                      self.update_call.intent)