2023-08-16 15:58:12 -04:00
|
|
|
load("//bazel/go:go_test.bzl", "go_test")
|
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "test_test",
|
|
|
|
srcs = ["mount_integration_test.go"],
|
2023-12-05 05:19:18 -05:00
|
|
|
count = 1,
|
|
|
|
# tool dependencies come from the test code itself (dd, rm, cp)
|
|
|
|
# and from github.com/kubernetes/mount-utils/mount_linux.go
|
|
|
|
data = [
|
|
|
|
"@coreutils//:bin/cp",
|
|
|
|
"@coreutils//:bin/dd",
|
|
|
|
"@coreutils//:bin/rm",
|
|
|
|
"@e2fsprogs//:bin/fsck.ext4",
|
|
|
|
"@e2fsprogs//:bin/mkfs.ext4",
|
|
|
|
"@util-linux//:bin/blkid",
|
|
|
|
"@util-linux//:bin/fsck",
|
|
|
|
"@util-linux//:bin/mount",
|
|
|
|
"@util-linux//:bin/umount",
|
|
|
|
],
|
|
|
|
env = {
|
|
|
|
"BLKID": "$(rlocationpath @util-linux//:bin/blkid)",
|
|
|
|
"CP": "$(rlocationpath @coreutils//:bin/cp)",
|
|
|
|
"DD": "$(rlocationpath @coreutils//:bin/dd)",
|
|
|
|
"FSCK": "$(rlocationpath @util-linux//:bin/fsck)",
|
|
|
|
"FSCK_EXT4": "$(rlocationpath @e2fsprogs//:bin/fsck.ext4)",
|
|
|
|
"MKFS_EXT4": "$(rlocationpath @e2fsprogs//:bin/mkfs.ext4)",
|
|
|
|
"MOUNT": "$(rlocationpath @util-linux//:bin/mount)",
|
|
|
|
"RM": "$(rlocationpath @coreutils//:bin/rm)",
|
|
|
|
"UMOUNT": "$(rlocationpath @util-linux//:bin/umount)",
|
|
|
|
},
|
2023-08-16 15:58:12 -04:00
|
|
|
# keep
|
2023-12-05 05:19:18 -05:00
|
|
|
tags = [
|
|
|
|
"integration",
|
|
|
|
"local",
|
|
|
|
"no-sandbox",
|
|
|
|
],
|
|
|
|
target_compatible_with = ["@platforms//os:linux"],
|
2023-08-16 15:58:12 -04:00
|
|
|
deps = select({
|
|
|
|
"@io_bazel_rules_go//go/platform:android": [
|
|
|
|
"//csi/cryptmapper",
|
|
|
|
"@com_github_stretchr_testify//assert",
|
|
|
|
"@com_github_stretchr_testify//require",
|
2023-12-05 05:19:18 -05:00
|
|
|
"@io_bazel_rules_go//go/runfiles:go_default_library",
|
2023-08-16 15:58:12 -04:00
|
|
|
"@org_uber_go_goleak//:goleak",
|
|
|
|
],
|
|
|
|
"@io_bazel_rules_go//go/platform:linux": [
|
|
|
|
"//csi/cryptmapper",
|
|
|
|
"@com_github_stretchr_testify//assert",
|
|
|
|
"@com_github_stretchr_testify//require",
|
2023-12-05 05:19:18 -05:00
|
|
|
"@io_bazel_rules_go//go/runfiles:go_default_library",
|
2023-08-16 15:58:12 -04:00
|
|
|
"@org_uber_go_goleak//:goleak",
|
|
|
|
],
|
|
|
|
"//conditions:default": [],
|
|
|
|
}),
|
|
|
|
)
|