Stop treating RAILS_MASTER_KEY as special
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -143,15 +143,6 @@ class ConfigurationTest < ActiveSupport::TestCase
|
||||
assert_equal "app", @config.ssh_options[:user]
|
||||
end
|
||||
|
||||
test "master key" do
|
||||
assert_equal "456", @config.master_key
|
||||
end
|
||||
|
||||
test "skip master key" do
|
||||
config = Mrsk::Configuration.new(@deploy.tap { |c| c[:skip_master_key] = true })
|
||||
assert_nil @config.master_key
|
||||
end
|
||||
|
||||
test "volume_args" do
|
||||
assert_equal ["--volume", "/local/path:/container/path"], @config.volume_args
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user