Merge pull request #415 from igor-alexandrov/fix-builder-configuration-validation

Removed validation for remote and local builder params
This commit is contained in:
Donal McBreen
2023-08-15 15:10:23 +01:00
committed by GitHub
2 changed files with 0 additions and 12 deletions

View File

@@ -83,10 +83,6 @@ class Mrsk::Configuration::Builder
private private
def valid? def valid?
if @options["local"] && !@options["remote"]
raise ArgumentError, "You must specify both local and remote builder config for remote multiarch builds"
end
if @options["cache"] && @options["cache"]["type"] if @options["cache"] && @options["cache"]["type"]
raise ArgumentError, "Invalid cache type: #{@options["cache"]["type"]}" unless ["gha", "registry"].include?(@options["cache"]["type"]) raise ArgumentError, "Invalid cache type: #{@options["cache"]["type"]}" unless ["gha", "registry"].include?(@options["cache"]["type"])
end end

View File

@@ -44,14 +44,6 @@ class ConfigurationBuilderTest < ActiveSupport::TestCase
assert_nil @config.builder.remote_host assert_nil @config.builder.remote_host
end end
test "remote config is missing when local is specified" do
@deploy_with_builder_option[:builder] = { "local" => { "arch" => "arm64", "host" => "unix:///Users/<%= `whoami`.strip %>/.docker/run/docker.sock" } }
assert_raises(ArgumentError) do
@config_with_builder_option.builder
end
end
test "setting both local and remote configs" do test "setting both local and remote configs" do
@deploy_with_builder_option[:builder] = { @deploy_with_builder_option[:builder] = {
"local" => { "arch" => "arm64", "host" => "unix:///Users/<%= `whoami`.strip %>/.docker/run/docker.sock" }, "local" => { "arch" => "arm64", "host" => "unix:///Users/<%= `whoami`.strip %>/.docker/run/docker.sock" },