Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanharan committed Oct 19, 2024
1 parent e132eba commit db9fa5b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/secrets_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,16 @@ class SecretsTest < ActiveSupport::TestCase
assert_equal "JKL", Kamal::Secrets.new(destination: "nodest")["SECRET2"]
end
end

test "no secrets files" do
with_test_secrets do
assert_raises(Kamal::ConfigurationError, "Secret 'SECRET' not found, cannot find secret files .kamal/secrets-common, .kamal/secrets") do
Kamal::Secrets.new["SECRET"]
end

assert_raises(Kamal::ConfigurationError, "Secret 'SECRET' not found, cannot find secret files .kamal/secrets-common, .kamal/secrets.dest") do
Kamal::Secrets.new(destination: "dest")["SECRET"]
end
end
end
end

0 comments on commit db9fa5b

Please sign in to comment.