-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Filestore] issue-2547: support local filesystems overrides in csi dr…
…iver
- Loading branch information
Showing
12 changed files
with
565 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import subprocess | ||
|
||
|
||
import cloud.blockstore.tests.csi_driver.lib.csi_runner as csi | ||
|
||
|
||
def test_volume_lifecycle_local_fs(): | ||
fs_name = "example-fs" | ||
fs_size = 1024**3 | ||
pod_names = ["example-pod-1", "example-pod-2"] | ||
pod_ids = ["deadbeef1", "deadbeef2"] | ||
|
||
env, run = csi.init(vm_mode="mount", local_fs_ids=[fs_name]) | ||
try: | ||
env.csi.create_volume(name=fs_name, size=fs_size, is_nfs=True) | ||
env.csi.stage_volume(fs_name, "mount", is_nfs=True) | ||
for pod_name, pod_id in zip(pod_names, pod_ids): | ||
env.csi.publish_volume( | ||
pod_id=pod_id, | ||
volume_id=fs_name, | ||
pod_name=pod_name, | ||
access_type="mount", | ||
is_nfs=True, | ||
) | ||
for pod_name, pod_id in zip(pod_names, pod_ids): | ||
env.csi.unpublish_volume( | ||
pod_id=pod_id, volume_id=fs_name, access_type="mount" | ||
) | ||
|
||
env.csi.unstage_volume(volume_id=fs_name) | ||
|
||
except subprocess.CalledProcessError as e: | ||
csi.log_called_process_error(e) | ||
raise | ||
finally: | ||
csi.cleanup_after_test( | ||
env, volume_name=fs_name, access_type="mount", pods=pod_ids | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
PY3TEST() | ||
|
||
IF (SANITIZER_TYPE OR WITH_VALGRIND) | ||
INCLUDE(${ARCADIA_ROOT}/cloud/storage/core/tests/recipes/large.inc) | ||
ELSE() | ||
INCLUDE(${ARCADIA_ROOT}/cloud/storage/core/tests/recipes/medium.inc) | ||
ENDIF() | ||
|
||
SPLIT_FACTOR(1) | ||
|
||
TEST_SRCS( | ||
test.py | ||
) | ||
|
||
DEPENDS( | ||
cloud/blockstore/tools/csi_driver/cmd/nbs-csi-driver | ||
cloud/blockstore/tools/csi_driver/client | ||
cloud/blockstore/tests/csi_driver/lib | ||
cloud/blockstore/tools/testing/csi-sanity/bin | ||
cloud/blockstore/apps/client | ||
cloud/blockstore/apps/disk_agent | ||
cloud/blockstore/apps/endpoint_proxy | ||
cloud/blockstore/apps/server | ||
cloud/filestore/apps/client | ||
cloud/filestore/apps/vhost | ||
contrib/ydb/apps/ydbd | ||
) | ||
|
||
PEERDIR( | ||
cloud/blockstore/config | ||
cloud/blockstore/tests/csi_driver/lib | ||
cloud/blockstore/tests/python/lib | ||
cloud/storage/core/protos | ||
contrib/ydb/core/protos | ||
contrib/ydb/tests/library | ||
) | ||
SET_APPEND(QEMU_INVOKE_TEST YES) | ||
SET_APPEND(QEMU_VIRTIO none) | ||
SET_APPEND(QEMU_ENABLE_KVM True) | ||
SET_APPEND(QEMU_MEM 8G) | ||
INCLUDE(${ARCADIA_ROOT}/cloud/storage/core/tests/recipes/qemu.inc) | ||
|
||
END() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.