diff --git a/test/commands/builder_test.rb b/test/commands/builder_test.rb index e5daddfd..4e5e8046 100644 --- a/test/commands/builder_test.rb +++ b/test/commands/builder_test.rb @@ -144,6 +144,13 @@ class CommandsBuilderTest < ActiveSupport::TestCase builder.push.join(" ") end + test "push with provenance" do + builder = new_builder_command(builder: { "provenance" => "mode=max" }) + 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 --provenance mode=max .", + 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(" ") diff --git a/test/configuration/builder_test.rb b/test/configuration/builder_test.rb index 53740ca8..545273b6 100644 --- a/test/configuration/builder_test.rb +++ b/test/configuration/builder_test.rb @@ -134,6 +134,16 @@ class ConfigurationBuilderTest < ActiveSupport::TestCase assert_equal "default=$SSH_AUTH_SOCK", config.builder.ssh end + test "provenance" do + assert_nil config.builder.provenance + end + + test "setting provenance" do + @deploy[:builder]["provenance"] = "mode=max" + + assert_equal "mode=max", config.builder.provenance + end + test "local disabled but no remote set" do @deploy[:builder]["local"] = false