Skip to content

Commit

Permalink
Merge pull request #269 from bgurney-rh/stratis-cli-fsmountwrite
Browse files Browse the repository at this point in the history
stratis_cli_cert: add test_filesystem_mount_and_write
  • Loading branch information
mulkieran authored Jul 2, 2024
2 parents 1467204 + 91a47b5 commit 5af7786
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions stratis_cli_cert.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# isort: STDLIB
import argparse
import os
import subprocess
import sys
import unittest

Expand All @@ -27,6 +28,7 @@
from testlib.infra import (
DbusMonitor,
KernelKey,
MountPointManager,
PostTestCheck,
RunPostTestChecks,
StratisdSystemdStart,
Expand Down Expand Up @@ -1183,6 +1185,29 @@ def test_filesystem_destroy_permissions(self):
True,
)

@skip(_skip_condition(1))
def test_filesystem_mount_and_write(self):
"""
Test mount and write to filesystem.
"""
pool_name = make_test_pool(StratisCliCertify.DISKS[0:1])
filesystem_name = make_test_filesystem(pool_name)

mountpoints = MountPointManager().mount(
[os.path.join("/", "dev", "stratis", pool_name, filesystem_name)]
)

subprocess.check_call(
[
"dd",
"if=/dev/urandom",
f'of={os.path.join(mountpoints[0], "file1")}',
"bs=4096",
"count=256",
"conv=fsync",
]
)

@skip(_skip_condition(1))
def test_pool_stop_stopped(self):
"""
Expand Down

0 comments on commit 5af7786

Please sign in to comment.