Merge pull request #564 from basecamp/return-502-if-no-container

Return a 502 when container is down
This commit is contained in:
Donal McBreen
2023-11-08 14:58:22 +00:00
committed by GitHub
8 changed files with 39 additions and 38 deletions

View File

@@ -10,8 +10,7 @@ class AppTest < IntegrationTest
kamal :app, :stop
# traefik is up and returns 404s when it can't match a route
assert_app_not_found
assert_app_is_down
kamal :app, :start
@@ -51,7 +50,6 @@ class AppTest < IntegrationTest
kamal :app, :remove
# traefik is up and returns 404s when it can't match a route
assert_app_not_found
assert_app_is_down
end
end

View File

@@ -55,12 +55,6 @@ class IntegrationTest < ActiveSupport::TestCase
assert_app_version(version, response) if version
end
def assert_app_not_found
response = app_response
debug_response_code(response, "404")
assert_equal "404", response.code
end
def wait_for_app_to_be_up(timeout: 20, up_count: 3)
timeout_at = Time.now + timeout
up_times = 0