mirror of
https://github.com/RustyRaptor/deploy-sourcegraph-docker.git
synced 2026-12-04 00:05:19 -07:00
1.5 KiB
1.5 KiB
Testing
Developers can test using Vagrant and your Sourcegraph GCP account.
- Use these instructions to install
Vagranton 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-testwheredeployment-type-testcan bepure-docker-testordocker-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