Commit a4b050f5 authored by Stan Hu's avatar Stan Hu

Use CACHE_CLASSES in test environment

Since CACHE_CLASSES is defined in the development environment, also use
it in test to be consistent.
parent 91bc114f
...@@ -65,6 +65,7 @@ variables: ...@@ -65,6 +65,7 @@ variables:
ES_JAVA_OPTS: "-Xms256m -Xmx256m" ES_JAVA_OPTS: "-Xms256m -Xmx256m"
ELASTIC_URL: "http://elastic:changeme@elasticsearch:9200" ELASTIC_URL: "http://elastic:changeme@elasticsearch:9200"
DOCKER_VERSION: "19.03.0" DOCKER_VERSION: "19.03.0"
CACHE_CLASSES: "true"
# Preparing custom clone path to reduce space used by all random forks # Preparing custom clone path to reduce space used by all random forks
# on GitLab.com's Shared Runners. Our main forks - especially the security # on GitLab.com's Shared Runners. Our main forks - especially the security
......
...@@ -17,9 +17,7 @@ Rails.application.configure do ...@@ -17,9 +17,7 @@ Rails.application.configure do
# test suite. You never need to work with it otherwise. Remember that # test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped # your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there! # and recreated between test runs. Don't rely on the data there!
config.cache_classes = Gitlab::Utils.to_boolean(ENV['CACHE_CLASSES'], default: false)
# Code doesn't change in CI so we don't need code-reloading
config.cache_classes = !!ENV['CI']
# Configure static asset server for tests with Cache-Control for performance # Configure static asset server for tests with Cache-Control for performance
config.assets.compile = false if ENV['CI'] config.assets.compile = false if ENV['CI']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment