Merge pull request #1225 from matthewbjones/feature/sbom-attestations
Adds support for SBOM attestations
This commit is contained in:
@@ -158,6 +158,20 @@ class CommandsBuilderTest < ActiveSupport::TestCase
|
||||
builder.push.join(" ")
|
||||
end
|
||||
|
||||
test "push with sbom" do
|
||||
builder = new_builder_command(builder: { "sbom" => true })
|
||||
assert_equal \
|
||||
"docker buildx build --push --platform linux/amd64 --builder kamal-local-docker-container -t dhh/app:123 -t dhh/app:latest --label service=\"app\" --file Dockerfile --sbom true .",
|
||||
builder.push.join(" ")
|
||||
end
|
||||
|
||||
test "push with sbom false" do
|
||||
builder = new_builder_command(builder: { "sbom" => false })
|
||||
assert_equal \
|
||||
"docker buildx build --push --platform linux/amd64 --builder kamal-local-docker-container -t dhh/app:123 -t dhh/app:latest --label service=\"app\" --file Dockerfile --sbom false .",
|
||||
builder.push.join(" ")
|
||||
end
|
||||
|
||||
test "mirror count" do
|
||||
command = new_builder_command
|
||||
assert_equal "docker info --format '{{index .RegistryConfig.Mirrors 0}}'", command.first_mirror.join(" ")
|
||||
|
||||
@@ -144,6 +144,16 @@ class ConfigurationBuilderTest < ActiveSupport::TestCase
|
||||
assert_equal "mode=max", config.builder.provenance
|
||||
end
|
||||
|
||||
test "sbom" do
|
||||
assert_nil config.builder.sbom
|
||||
end
|
||||
|
||||
test "setting sbom" do
|
||||
@deploy[:builder]["sbom"] = true
|
||||
|
||||
assert_equal true, config.builder.sbom
|
||||
end
|
||||
|
||||
test "local disabled but no remote set" do
|
||||
@deploy[:builder]["local"] = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user