Accept any runtime in the hook tests
Occasionally in CI things run slowly and it takes more that 1 second for a cli test to run, so let's allow any value for the runtime in the hook checks.
This commit is contained in:
@@ -38,7 +38,7 @@ class CliTestCase < ActiveSupport::TestCase
|
||||
.with { |arg1, arg2| arg1 == :rm && arg2 == ".kamal/locks/app/details" }
|
||||
end
|
||||
|
||||
def assert_hook_ran(hook, output, version:, service_version:, hosts:, command:, subcommand: nil, runtime: nil)
|
||||
def assert_hook_ran(hook, output, version:, service_version:, hosts:, command:, subcommand: nil, runtime: false)
|
||||
performer = `whoami`.strip
|
||||
|
||||
assert_match "Running the #{hook} hook...\n", output
|
||||
@@ -52,7 +52,7 @@ class CliTestCase < ActiveSupport::TestCase
|
||||
KAMAL_HOSTS=\"#{hosts}\"\s
|
||||
KAMAL_COMMAND=\"#{command}\"\s
|
||||
#{"KAMAL_SUBCOMMAND=\\\"#{subcommand}\\\"\\s" if subcommand}
|
||||
#{"KAMAL_RUNTIME=\\\"#{runtime}\\\"\\s" if runtime}
|
||||
#{"KAMAL_RUNTIME=\\\"\\d+\\\"\\s" if runtime}
|
||||
;\s/usr/bin/env\s\.kamal/hooks/#{hook} }x
|
||||
|
||||
assert_match expected, output
|
||||
|
||||
Reference in New Issue
Block a user