No need for run_id
This commit is contained in:
@@ -189,10 +189,6 @@ class Kamal::Configuration
|
|||||||
raw_config.readiness_delay || 7
|
raw_config.readiness_delay || 7
|
||||||
end
|
end
|
||||||
|
|
||||||
def run_id
|
|
||||||
@run_id ||= SecureRandom.hex(16)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def run_directory
|
def run_directory
|
||||||
".kamal"
|
".kamal"
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ require "test_helper"
|
|||||||
class CommandsAppTest < ActiveSupport::TestCase
|
class CommandsAppTest < ActiveSupport::TestCase
|
||||||
setup do
|
setup do
|
||||||
setup_test_secrets("secrets" => "RAILS_MASTER_KEY=456")
|
setup_test_secrets("secrets" => "RAILS_MASTER_KEY=456")
|
||||||
Kamal::Configuration.any_instance.stubs(:run_id).returns("12345678901234567890123456789012")
|
|
||||||
|
|
||||||
@config = { service: "app", image: "dhh/app", registry: { "username" => "dhh", "password" => "secret" }, servers: [ "1.1.1.1" ], env: { "secret" => [ "RAILS_MASTER_KEY" ] }, builder: { "arch" => "amd64" } }
|
@config = { service: "app", image: "dhh/app", registry: { "username" => "dhh", "password" => "secret" }, servers: [ "1.1.1.1" ], env: { "secret" => [ "RAILS_MASTER_KEY" ] }, builder: { "arch" => "amd64" } }
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -296,11 +296,6 @@ class ConfigurationTest < ActiveSupport::TestCase
|
|||||||
assert_equal "$(pwd)/.kamal", config.run_directory_as_docker_volume
|
assert_equal "$(pwd)/.kamal", config.run_directory_as_docker_volume
|
||||||
end
|
end
|
||||||
|
|
||||||
test "run id" do
|
|
||||||
SecureRandom.expects(:hex).with(16).returns("09876543211234567890098765432112")
|
|
||||||
assert_equal "09876543211234567890098765432112", @config.run_id
|
|
||||||
end
|
|
||||||
|
|
||||||
test "asset path" do
|
test "asset path" do
|
||||||
assert_nil @config.asset_path
|
assert_nil @config.asset_path
|
||||||
assert_equal "foo", Kamal::Configuration.new(@deploy.merge!(asset_path: "foo")).asset_path
|
assert_equal "foo", Kamal::Configuration.new(@deploy.merge!(asset_path: "foo")).asset_path
|
||||||
|
|||||||
Reference in New Issue
Block a user