Exemple #1
0
 def test_pool_list_empty(self):
     """
     Test listing an non-existent pool.
     """
     result = StratisDbus.pool_list()
     self.assertIsInstance(result, list)
     self.assertEqual(result, [])
Exemple #2
0
    def test_pool_list_not_empty(self):
        """
        Test listing an non-existent pool.
        """
        pool_name = p_n()
        make_test_pool(pool_name, StratisCertify.DISKS[0:1])

        self._inequality_test(StratisDbus.pool_list(), [])
Exemple #3
0
    def test_pool_list_not_empty(self):
        """
        Test listing an non-existent pool.
        """
        pool_name = p_n()
        make_test_pool(pool_name, DISKS[0:1])

        result = StratisDbus.pool_list()
        self.assertIsInstance(result, list)
        self.assertNotEqual(result, [])
Exemple #4
0
    def setUp(self):
        """
        Setup for an individual test.
        * Register a cleanup action, to be run if the test fails.
        * Ensure that stratisd is running via systemd.
        * Use the running stratisd instance to destroy any existing
        Stratis filesystems, pools, etc.
        :return: None
        """
        self.addCleanup(clean_up)

        if process_exists("stratisd") is None:
            exec_command(["systemctl", "start", "stratisd"])
            time.sleep(20)

        StratisDbus.destroy_all()
        assert StratisDbus.pool_list() == []