Files
deploy-sourcegraph-docker/TESTING.md
T
davejrt 1d0cfbc679 E2e/compose (#150)
* add in compose tests
2020-09-10 14:35:23 -05:00

1.5 KiB

Testing

Developers can test using Vagrant and your Sourcegraph GCP account.

  • Use these instructions to install Vagrant on your local machine. Once sucessfully installed, install the required plugin:
vagrant plugin install vagrant-google
  • Ensure your credentials are correct by excecuting the command below and following the prompts:
gcloud auth application-default login
  • Configure your local variables using the following environment variables

    • VAGRANT_GCP_PROJECT_ID: Project to run on. (default: sourcegraph-server)
    • VAGRANT_SSH_USER: Your SSH user ID as specified in GCP metadata. (default: ENV['USER'])
    • VAGRANT_SSH_KEY: Path to your SSH Keys as specified in GCP metadata. (default: ~/.ssh/id_rsa)
  • Run the tests with a deployment-type-test where deployment-type-test can be pure-docker-test or docker-compose-test.

.buildkite/test.sh <deployment-type-test>

This command will start a GCP instance, upload your local copy of the reposistory and run the relevant smoke test for each deployment type, pure-docker-test or docker-compose-test.

To run any additional tests or commands, edit servers.yaml and add the commands to the shell_commands list, eg:

shell_commands:
    - [...]
    - /vagrant/moretests.sh
    - "ps aux | grep thisthat"
    - |
      cd /vagrant
      bartest.sh