예제 #1
0
    def test_pool_create_encrypted(self):
        """
        Test creating an encrypted pool.
        """
        with KernelKey("test-password") as key_desc:
            pool_name = p_n()

            self._unittest_command(
                StratisDbus.pool_create(pool_name, StratisCertify.DISKS, key_desc),
                dbus.UInt16(0),
            )
예제 #2
0
    def test_pool_create_encrypted_with_cache(self):
        """
        Test creating an encrypted pool with cache.

        This should fail.
        """
        with KernelKey("test-password") as key_desc:
            pool_name = make_test_pool(StratisCertify.DISKS[0:2], key_desc)
            self.unittest_command(
                [
                    _STRATIS_CLI,
                    "pool",
                    "init-cache",
                    pool_name,
                    StratisCertify.DISKS[2],
                ],
                1,
                False,
                True,
            )
예제 #3
0
 def test_pool_create_encrypted(self):
     """
     Test creating an encrypted pool.
     """
     with KernelKey("test-password") as key_desc:
         pool_name = p_n()
         self.unittest_command(
             [
                 _STRATIS_CLI,
                 "pool",
                 "create",
                 "--key-desc",
                 key_desc,
                 pool_name,
                 StratisCertify.DISKS[0],
             ],
             0,
             True,
             True,
         )