Skip to content

Commit

Permalink
Merge pull request #415 from igor-alexandrov/fix-builder-configuratio…
Browse files Browse the repository at this point in the history
…n-validation

Removed validation for remote and local builder params
  • Loading branch information
djmb committed Aug 15, 2023
2 parents aa89ede + 0c52a10 commit 4262fce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions lib/mrsk/configuration/builder.rb
Expand Up @@ -83,10 +83,6 @@ def cache_to

private
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"]
raise ArgumentError, "Invalid cache type: #{@options["cache"]["type"]}" unless ["gha", "registry"].include?(@options["cache"]["type"])
end
Expand Down
8 changes: 0 additions & 8 deletions test/configuration/builder_test.rb
Expand Up @@ -44,14 +44,6 @@ class ConfigurationBuilderTest < ActiveSupport::TestCase
assert_nil @config.builder.remote_host
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
@deploy_with_builder_option[:builder] = {
"local" => { "arch" => "arm64", "host" => "unix:///Users/<%= `whoami`.strip %>/.docker/run/docker.sock" },
Expand Down

0 comments on commit 4262fce

Please sign in to comment.