def test_instance(self):
        '''
        Test creating and deleting instance on Joyent
        '''
        try:
            self.assertIn(
                INSTANCE_NAME,
                [i.strip() for i in self.run_cloud('-p joyent-test {0}'.format(INSTANCE_NAME))]
            )
        except AssertionError:
            self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME))
            raise

        # delete the instance
        try:
            self.assertIn(
                INSTANCE_NAME + ':',
                [i.strip() for i in self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME))]
            )
        except __HOLE__:
            raise
dataset/ETHPy150Open saltstack/salt/tests/integration/cloud/providers/joyent.py/JoyentTest.test_instance