Esempio n. 1
0
 def test_wait_till_change_set_complete_failed(self):
     # Need 2 responses for try_count
     for i 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=.1)
Esempio n. 2
0
    def test_wait_till_change_set_complete_success(self):
        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")
Esempio n. 3
0
 def test_wait_till_change_set_complete_failed(self):
     # Need 2 responses for try_count
     for i 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=.1)
Esempio n. 4
0
    def test_wait_till_change_set_complete_success(self):
        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")