def test_no_list_listings(self):
        """
        Test that commands that optionally take a list work both ways.
        :return: None
        """
        pool_name = p_n()
        fs_name = fs_n()
        StratisCli.pool_create(pool_name, block_devices=DISKS)
        StratisCli.fs_create(pool_name, fs_name)

        self.assertEqual(StratisCli.pool_list(), StratisCli.pool_list(False))
        self.assertEqual(StratisCli.fs_list(), StratisCli.fs_list(False))
        self.assertEqual(StratisCli.blockdev_list(),
                         StratisCli.blockdev_list(False))
Beispiel #2
0
 def test_fs_create(self):
     """
     Test creating a FS
     :return: None
     """
     pool_name = p_n()
     fs_name = fs_n()
     StratisCli.pool_create(pool_name, [DISKS[0]])
     StratisCli.fs_create(pool_name, fs_name)
     fs = StratisCli.fs_list()
     self.assertTrue(fs_name in fs.keys())
     self.assertEqual(1, len(fs))
     self.assertEqual(fs[fs_name]["POOL_NAME"], pool_name)
Beispiel #3
0
 def test_fs_snap_shot(self):
     """
     Test creating a FS snap shot.
     :return: None
     """
     pool_name = p_n()
     fs_name = fs_n()
     fs_ss = fs_n()
     StratisCli.pool_create(pool_name, [DISKS[0]])
     StratisCli.fs_create(pool_name, fs_name)
     StratisCli.fs_ss_create(pool_name, fs_name, fs_ss)
     fs = StratisCli.fs_list()
     self.assertTrue(fs_ss in fs)
Beispiel #4
0
    def test_fs_rename(self):
        """
        Test renaming a FS
        :return: None
        """
        pool_name = p_n()
        fs_name = fs_n()
        fs_new_name = fs_n()
        StratisCli.pool_create(pool_name, [DISKS[0]])
        StratisCli.fs_create(pool_name, fs_name)
        StratisCli.fs_rename(pool_name, fs_name, fs_new_name)

        fs = StratisCli.fs_list()
        self.assertTrue(fs_new_name in fs.keys())
        self.assertFalse(fs_name in fs.keys())
        self.assertEqual(1, len(fs))
Beispiel #5
0
    def test_fs_destroy(self):
        """
        Test destroying a FS
        :return:
        """
        pool_name = p_n()
        fs_name = fs_n()
        fs_too = fs_n()
        StratisCli.pool_create(pool_name, [DISKS[0]])
        StratisCli.fs_create(pool_name, fs_name)
        StratisCli.fs_create(pool_name, fs_too)
        StratisCli.fs_destroy(pool_name, fs_name)

        fs = StratisCli.fs_list()
        self.assertEqual(1, len(fs))
        self.assertFalse(fs_n in fs)
        self.assertTrue(fs_too in fs)