Skip to content

Use the configured redis DB in specs that run workhorse

Nick Thomas requested to merge workhorse-respect-db-config into master

What does this MR do?

In pursuit of gitlab-development-kit#818 (closed) , we want to start running the specs against redis DB 1, while the development environment uses redis DB 0. Alternatively, we may want to start running the specs against redis DBs 10/11/12/13, while development uses 0/1/2/3 if we decide to split redis instances by database number. This is what we do for tests running in the CI environment.

This is configured in config/resque.yml, or config/redis.[cache|queues|shared_state|trace_chunks].yml, and exposed to Workhorse as redis_url. However, Rails configures the redis DB in the URL, while workhorse uses a separate config entry.

Translate between the two options in the code that writes out the Workhorse config file. Since gdk reconfigure may now change this setting, also modify the test suite so it re-writes the workhorse config file every time. This should be relatively cheap.

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to gitlab-development-kit#818 (closed)

Edited by Nick Thomas

Merge request reports

Loading