2023-03-09 09:23:42 -05:00
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
|
|
|
load("//bazel/go:go_test.bzl", "go_ld_test", "go_test")
|
|
|
|
|
|
|
|
go_library(
|
|
|
|
name = "diskencryption",
|
2023-07-17 07:55:31 -04:00
|
|
|
srcs = ["diskencryption.go"],
|
2023-03-09 09:23:42 -05:00
|
|
|
importpath = "github.com/edgelesssys/constellation/v2/bootstrapper/internal/diskencryption",
|
2023-06-09 04:35:52 -04:00
|
|
|
target_compatible_with = [
|
|
|
|
"@platforms//os:linux",
|
|
|
|
],
|
2023-03-09 09:23:42 -05:00
|
|
|
visibility = ["//bootstrapper:__subpackages__"],
|
2023-07-17 07:55:31 -04:00
|
|
|
deps = [
|
|
|
|
"//internal/cryptsetup",
|
|
|
|
"@com_github_spf13_afero//:afero",
|
|
|
|
],
|
2023-03-09 09:23:42 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "diskencryption_test",
|
|
|
|
srcs = ["diskencryption_test.go"],
|
|
|
|
embed = [":diskencryption"],
|
|
|
|
# keep
|
|
|
|
tags = ["manual"],
|
2023-05-17 11:35:36 -04:00
|
|
|
deps = select({
|
|
|
|
"@io_bazel_rules_go//go/platform:android": [
|
|
|
|
"@com_github_spf13_afero//:afero",
|
|
|
|
"@com_github_stretchr_testify//assert",
|
|
|
|
"@com_github_stretchr_testify//require",
|
|
|
|
"@org_uber_go_goleak//:goleak",
|
|
|
|
],
|
|
|
|
"@io_bazel_rules_go//go/platform:linux": [
|
|
|
|
"@com_github_spf13_afero//:afero",
|
|
|
|
"@com_github_stretchr_testify//assert",
|
|
|
|
"@com_github_stretchr_testify//require",
|
|
|
|
"@org_uber_go_goleak//:goleak",
|
|
|
|
],
|
|
|
|
"//conditions:default": [],
|
|
|
|
}),
|
2023-03-09 09:23:42 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
go_ld_test(
|
|
|
|
name = "diskencryption_ld_test",
|
|
|
|
src = "diskencryption_test",
|
|
|
|
ld = "//rpm:ld",
|
|
|
|
)
|