Пример #1
0
 def test_list_launched_nonexistent_uuid(self):
     try:
         # Use a random UUID that doesn't exist.
         self.cobalt_api.list_launched_instances(self.context, utils.create_uuid())
         self.fail("An InstanceNotFound exception should be thrown")
     except exception.InstanceNotFound:
         pass
Пример #2
0
    def test_bless_instance_not_found(self):

        # Create a new UUID for a non existing instance.
        blessed_uuid = utils.create_uuid()
        try:
            self.cobalt.bless_instance(self.context, instance_uuid=blessed_uuid,
                                            migration_url=None)
            self.fail("Bless should have thrown InstanceNotFound exception.")
        except exception.InstanceNotFound:
            pass
Пример #3
0
    def test_bless_instance_not_found(self):

        # Create a new UUID for a non existing instance.
        blessed_uuid = utils.create_uuid()
        try:
            self.cobalt.bless_instance(self.context,
                                       instance_uuid=blessed_uuid,
                                       migration_url=None)
            self.fail("Bless should have thrown InstanceNotFound exception.")
        except exception.InstanceNotFound:
            pass