File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def hosts
3636 end
3737
3838 def env_tags ( host )
39- tagged_hosts . fetch ( host ) . collect { |tag | config . env_tag ( tag ) }
39+ tagged_hosts . fetch ( host ) . collect { |tag | config . env_tag ( tag ) } . compact
4040 end
4141
4242 def cmd
Original file line number Diff line number Diff line change @@ -29,6 +29,13 @@ class ConfigurationRoleTest < ActiveSupport::TestCase
2929 assert_equal [ "1.1.1.3" , "1.1.1.4" ] , config_with_roles . role ( :workers ) . hosts
3030 end
3131
32+ test "missing env tag is ignored" do
33+ @deploy_with_roles [ :servers ] [ "workers" ] [ "hosts" ] = [ { "1.1.1.3" => [ "job" ] } ]
34+
35+ role = Kamal ::Configuration . new ( @deploy_with_roles ) . role ( :workers )
36+ assert_equal "redis://a/b" , role . env ( "1.1.1.3" ) . clear [ "REDIS_URL" ]
37+ end
38+
3239 test "cmd" do
3340 assert_nil config . role ( :web ) . cmd
3441 assert_equal "bin/jobs" , config_with_roles . role ( :workers ) . cmd
You can’t perform that action at this time.
0 commit comments