Skip to content

Commit

Permalink
Test for both undefined roles and missing traefik.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdkent committed Nov 11, 2023
1 parent a9cc7c7 commit 073f745
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/configuration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,16 @@ class ConfigurationTest < ActiveSupport::TestCase
end

test "primary web role no traefik" do
error = assert_raises(ArgumentError) do
Kamal::Configuration.new(@deploy_with_roles.merge(primary_web_role: "workers"))
end
assert_match /workers needs to have traefik enabled/, error.message
end

test "primary web role missing" do
error = assert_raises(ArgumentError) do
Kamal::Configuration.new(@deploy.merge(primary_web_role: "bar"))
end
assert_match /bar/, error.message
assert_match /bar isn't defined/, error.message
end
end

0 comments on commit 073f745

Please sign in to comment.