Ejemplo n.º 1
0
    def test_cleanup(self):
        """Test _cleanup kills all instance kinds"""
        redis = RedisInstance(10101)
        mongo = MongoInstance(10102)
        self.assertEqual(len(managed_instance.running_instances), 2)

        managed_instance._cleanup(exiting=True)
        self.assertEqual(len(managed_instance.running_instances), 0)
        self.assertFalse(os.path.exists(managed_instance.instance_tmpdir))

        # It's module-wide so reset this for future tests
        managed_instance.instance_tmpdir = tempfile.mkdtemp()
    def test_cleanup(self):
        """Test _cleanup kills all instance kinds"""
        redis = RedisInstance(10101)
        mongo = MongoInstance(10102)
        self.assertEqual(len(managed_instance.running_instances), 2)

        managed_instance._cleanup(exiting=True)
        self.assertEqual(len(managed_instance.running_instances), 0)
        self.assertFalse(os.path.exists(managed_instance.instance_tmpdir))

        # It's module-wide so reset this for future tests
        managed_instance.instance_tmpdir = tempfile.mkdtemp()
Ejemplo n.º 3
0
 def tearDown(self):
     managed_instance._cleanup()
Ejemplo n.º 4
0
 def tearDown(self):
     managed_instance._cleanup()