From 081584c676093095dc160ed44331adc3253834f8 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Wed, 20 Dec 2017 15:46:38 +0100 Subject: [PATCH] Allow running smoke tests within docker image with latest code --- script/docker_test.rb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/script/docker_test.rb b/script/docker_test.rb index a4b9a6aabe7..0d6a199238a 100644 --- a/script/docker_test.rb +++ b/script/docker_test.rb @@ -1,8 +1,10 @@ # This script is run in the discourse_test docker image # Available environment variables: -# => COMMIT_HASH used by the discourse_test docker image to load a specific commit of discourse -# this can also be set to a branch, e.g. "origin/tests-passed" -# See lib/tasks/docker.rake for more information +# => NO_UPDATE disables updating the source code within the discourse_test docker image +# => COMMIT_HASH used by the discourse_test docker image to load a specific commit of discourse +# this can also be set to a branch, e.g. "origin/tests-passed" +# => RUN_SMOKE_TESTS executes the smoke tests instead of the regular tests from docker.rake +# See lib/tasks/docker.rake and lib/tasks/smoke_test.rake for more information def run_or_fail(command) pid = Process.spawn(command) @@ -18,4 +20,8 @@ unless ENV['NO_UPDATE'] run_or_fail("bundle") end -run_or_fail("bundle exec rake docker:test") +if ENV['RUN_SMOKE_TESTS'] + run_or_fail("bundle exec rake smoke:test") +else + run_or_fail("bundle exec rake docker:test") +end