#
Managing Secrets
Test runs may require access to credentials (such as API keys) which you don't want to store in version control.
To make secrets available to you test runs, add them from the TURBO TEST Web UI:
- Navigate to the TURBO TEST web UI
- Select your repository from the top navigation menu item 'Secrets'
- Add necessary secrets for your test suite to access private resources
Secrets are available as environment variables inside the virtual machine; e.g. $RAILS_MASTER_KEY
Typically, Ruby on Rails applications require either an environment variable RAILS_MASTER_KEY
or an encrypted credentials file such as ./config/credentials/test.key
Encrypted credentials files are not usually stored in version control. To create a credentials file from a secret created from the TURBO TEST Web UI, add this command to your before_test_run
section:
[before_test_run]
commands = '''
cat $RAILS_MASTER_KEY > ./config/credentials/test.key
'''