Merge branch 'main' into pr/53
* main: Bump version for 0.8.0 Remove images of the same name before pulling a new one Changed to a timeout Better language Switch to ruby-based retry
This commit is contained in:
15
test/cli/build_test.rb
Normal file
15
test/cli/build_test.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require_relative "cli_test_case"
|
||||
|
||||
class CliBuildTest < CliTestCase
|
||||
test "pull" do
|
||||
run_command("pull").tap do |output|
|
||||
assert_match /docker image rm --force dhh\/app:999/, output
|
||||
assert_match /docker pull dhh\/app:999/, output
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def run_command(*command)
|
||||
stdouted { Mrsk::Cli::Build.start([*command, "-c", "test/fixtures/deploy_with_accessories.yml"]) }
|
||||
end
|
||||
end
|
||||
@@ -24,7 +24,7 @@ class CommandsHealthcheckTest < ActiveSupport::TestCase
|
||||
|
||||
test "curl" do
|
||||
assert_equal \
|
||||
"curl --silent --output /dev/null --write-out '%{http_code}' --retry-max-time 10 --retry 5 http://localhost:3999/up",
|
||||
"curl --silent --output /dev/null --write-out '%{http_code}' --max-time 2 http://localhost:3999/up",
|
||||
new_command.curl.join(" ")
|
||||
end
|
||||
|
||||
@@ -32,7 +32,7 @@ class CommandsHealthcheckTest < ActiveSupport::TestCase
|
||||
@config[:healthcheck] = { "path" => "/healthz" }
|
||||
|
||||
assert_equal \
|
||||
"curl --silent --output /dev/null --write-out '%{http_code}' --retry-max-time 10 --retry 5 http://localhost:3999/healthz",
|
||||
"curl --silent --output /dev/null --write-out '%{http_code}' --max-time 2 http://localhost:3999/healthz",
|
||||
new_command.curl.join(" ")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user