Stop treating RAILS_MASTER_KEY as special

This commit is contained in:
David Heinemeier Hansson
2023-02-04 15:26:59 +01:00
parent 64a5a790a7
commit cf9a402ad8
5 changed files with 5 additions and 42 deletions

View File

@@ -4,7 +4,7 @@ class CommandsAppTest < ActiveSupport::TestCase
setup do
ENV["RAILS_MASTER_KEY"] = "456"
@config = { service: "app", image: "dhh/app", registry: { "username" => "dhh", "password" => "secret" }, servers: [ "1.1.1.1" ] }
@config = { service: "app", image: "dhh/app", registry: { "username" => "dhh", "password" => "secret" }, servers: [ "1.1.1.1" ], env: { "secret" => [ "RAILS_MASTER_KEY" ] } }
@app = Mrsk::Commands::App.new Mrsk::Configuration.new(@config).tap { |c| c.version = "999" }
end
@@ -26,13 +26,6 @@ class CommandsAppTest < ActiveSupport::TestCase
@app.run.join(" ")
end
test "run without master key" do
ENV["RAILS_MASTER_KEY"] = nil
@app = Mrsk::Commands::App.new Mrsk::Configuration.new(@config.tap { |c| c[:skip_master_key] = true })
assert @app.run.exclude?("RAILS_MASTER_KEY=456")
end
test "start" do
assert_equal \
"docker start app-999",