Example #1
0
    def test_wait_till_change_set_complete_success(self):
        """Test wait till change set complete success."""
        self.stubber.add_response(
            "describe_change_set",
            generate_change_set_response("CREATE_COMPLETE"))
        with self.stubber:
            wait_till_change_set_complete(self.cfn, "FAKEID")

        self.stubber.add_response("describe_change_set",
                                  generate_change_set_response("FAILED"))
        with self.stubber:
            wait_till_change_set_complete(self.cfn, "FAKEID")
Example #2
0
 def test_wait_till_change_set_complete_failed(self) -> None:
     """Test wait till change set complete failed."""
     # Need 2 responses for try_count
     for _ in range(2):
         self.stubber.add_response(
             "describe_change_set", generate_change_set_response("CREATE_PENDING")
         )
     with self.stubber:
         with self.assertRaises(exceptions.ChangesetDidNotStabilize):
             wait_till_change_set_complete(
                 self.cfn, "FAKEID", try_count=2, sleep_time=0.1
             )