Skip to content

Commit

Permalink
test: add test for setting entrypoint to [] (#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayyn authored Jul 25, 2024
1 parent 304b5cd commit e389dde
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion examples/assertion/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@ assert_oci_config(
image = ":case13",
)


# Case 14: created property should be epoch start
oci_image(
name = "case14",
Expand Down Expand Up @@ -484,6 +483,42 @@ assert_oci_config(
image = ":case15_cmd",
)

# Case 16: allow setting entrypoint to `[]`
# See: https://github.com/bazel-contrib/rules_oci/issues/336
oci_image(
name = "case16_base",
architecture = "arm64",
cmd = [
"-c",
"test",
],
entrypoint = ["/bin/bash"],
os = "linux",
)

assert_oci_config(
name = "test_case16_base",
cmd_eq = [
"-c",
"test",
],
entrypoint_eq = ["/bin/bash"],
image = ":case16_base",
)

oci_image(
name = "case16",
base = ":case16_base",
entrypoint = [],
)

assert_oci_config(
name = "test_case16",
cmd_eq = None,
entrypoint_eq = [],
image = ":case16",
)

# build them as test.
build_test(
name = "test",
Expand Down

0 comments on commit e389dde

Please sign in to comment.