-
Notifications
You must be signed in to change notification settings - Fork 37
/
BUILD.bazel
37 lines (33 loc) · 984 Bytes
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
load("//distroless:defs.bzl", "java_keystore")
load("//distroless/tests:asserts.bzl", "assert_jks_listing", "assert_tar_mtree")
java_keystore(
name = "java_keystore",
certificates = [
# asserting that we support both bundle x509 certs
# and single x509 certs
"amazon.crt",
"bundle.crt",
],
)
filegroup(
name = "java_keystore_jks",
srcs = [":java_keystore"],
output_group = "jks",
)
assert_jks_listing(
name = "test_java_keystore_jks",
actual = "java_keystore_jks",
expected = "expected.jks.output",
)
assert_tar_mtree(
name = "test_java_keystore",
actual = "java_keystore",
expected = """\
#mtree
./etc time=946684800.0 mode=755 gid=0 uid=0 type=dir
./etc/ssl time=0.0 mode=755 gid=0 uid=0 type=dir
./etc/ssl/certs time=0.0 mode=755 gid=0 uid=0 type=dir
./etc/ssl/certs/java time=0.0 mode=755 gid=0 uid=0 type=dir
./etc/ssl/certs/java/cacerts time=0.0 mode=555 gid=0 uid=0 type=file size=5349
""",
)