We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f1a9a09 + dd8cadf commit 9035bd0Copy full SHA for 9035bd0
test/secrets_test.rb
@@ -20,6 +20,20 @@ class SecretsTest < ActiveSupport::TestCase
20
end
21
22
23
+ test "env references" do
24
+ with_test_secrets("secrets" => "SECRET1=$SECRET1") do
25
+ ENV["SECRET1"] = "ABC"
26
+ assert_equal "ABC", Kamal::Secrets.new["SECRET1"]
27
+ end
28
29
+
30
+ test "secrets file value overrides env" do
31
+ with_test_secrets("secrets" => "SECRET1=DEF") do
32
33
+ assert_equal "DEF", Kamal::Secrets.new["SECRET1"]
34
35
36
37
test "destinations" do
38
with_test_secrets("secrets.dest" => "SECRET=DEF", "secrets" => "SECRET=ABC", "secrets-common" => "SECRET=GHI\nSECRET2=JKL") do
39
assert_equal "ABC", Kamal::Secrets.new["SECRET"]
0 commit comments