This commit is contained in:
Donal McBreen
2023-09-07 15:07:43 +01:00
parent aa9999809c
commit c122f97181
9 changed files with 152 additions and 21 deletions

View File

@@ -20,6 +20,8 @@ class MainTest < IntegrationTest
assert_app_is_up version: second_version
assert_hooks_ran "pre-connect", "pre-build", "pre-deploy", "post-deploy"
assert_accumulated_assets first_version, second_version
kamal :rollback, first_version
assert_hooks_ran "pre-connect", "pre-deploy", "post-deploy"
assert_app_is_up version: first_version
@@ -69,4 +71,10 @@ class MainTest < IntegrationTest
def assert_no_remote_env_file
assert_equal "nofile", docker_compose("exec vm1 stat /root/.kamal/env/roles/app-web.env 2> /dev/null || echo nofile", capture: true)
end
def assert_accumulated_assets(*versions)
versions.each do |version|
assert_equal "200", Net::HTTP.get_response(URI.parse("http://localhost:12345/versions/#{version}")).code
end
end
end