forked from basecamp/kamal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsshkit_test.rb
28 lines (24 loc) · 988 Bytes
/
sshkit_test.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require "test_helper"
class ConfigurationSshkitTest < ActiveSupport::TestCase
setup do
@deploy = {
service: "app", image: "dhh/app",
registry: { "username" => "dhh", "password" => "secret" },
env: { "REDIS_URL" => "redis://x/y" },
builder: { "arch" => "amd64" },
servers: [ "1.1.1.1", "1.1.1.2" ],
volumes: [ "/local/path:/container/path" ]
}
@config = Kamal::Configuration.new(@deploy)
end
test "sshkit max concurrent starts" do
assert_equal 30, @config.sshkit.max_concurrent_starts
@config = Kamal::Configuration.new(@deploy.tap { |c| c.merge!(sshkit: { "max_concurrent_starts" => 50 }) })
assert_equal 50, @config.sshkit.max_concurrent_starts
end
test "sshkit pool idle timeout" do
assert_equal 900, @config.sshkit.pool_idle_timeout
@config = Kamal::Configuration.new(@deploy.tap { |c| c.merge!(sshkit: { "pool_idle_timeout" => 600 }) })
assert_equal 600, @config.sshkit.pool_idle_timeout
end
end