constellation/csi/test/BUILD.bazel

58 lines
2.1 KiB
Python
Raw Normal View History

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"],
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)",
},
# This test frequently runs into https://github.com/martinjungblut/go-cryptsetup/issues/13.
flaky = 1,
2023-08-16 15:58:12 -04:00
# keep
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",
"@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",
"@io_bazel_rules_go//go/runfiles:go_default_library",
2023-08-16 15:58:12 -04:00
"@org_uber_go_goleak//:goleak",
],
"//conditions:default": [],
}),
)