1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Run puma cli server in unbundled env in worker gem tests [changelog skip] (#2478)

* Run puma cli server in unbundled env in worker gem tests

Running `puma` in a clean bundler env is a more realistic way to start
puma.

* Install gems to release directory in worker gem tests
This commit is contained in:
Chris LaRose 2020-11-02 16:47:45 -08:00 committed by GitHub
parent b6ca443bb8
commit 7aa62c7e5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,8 +35,11 @@ class TestWorkerGemIndependence < TestIntegration
set_release_symlink File.expand_path(old_app_dir, __dir__)
Dir.chdir(current_release_symlink) do
bundle_install
cli_server '--prune-bundler -w 1'
with_unbundled_env do
system("bundle config --local path vendor/bundle", out: File::NULL)
system("bundle install", out: File::NULL)
cli_server '--prune-bundler -w 1'
end
end
connection = connect
@ -45,7 +48,10 @@ class TestWorkerGemIndependence < TestIntegration
set_release_symlink File.expand_path(new_app_dir, __dir__)
Dir.chdir(current_release_symlink) do
bundle_install
with_unbundled_env do
system("bundle config --local path vendor/bundle", out: File::NULL)
system("bundle install", out: File::NULL)
end
end
start_phased_restart
@ -77,10 +83,4 @@ class TestWorkerGemIndependence < TestIntegration
Bundler.with_unbundled_env { yield }
end
end
def bundle_install
with_unbundled_env do
system("bundle install", out: File::NULL)
end
end
end