This framework is designed to run End-to-End API tests
Note: These tests always run on CI unless explicitly labeled otherwise.
- Run make -C .. proto-generated-srcs to make sure the protos are up-to-date
- Deploy the StackRox platform
ex: ../deploy/k8s/deploy-local.sh
Note: There may not be any running deployments called nginx, as it will collide with the tests.
Note: Some tests are just easier to run on CI (example: anything needing certs).
Alternatively, try the launcher script in ./e2e.
- Add the following values to your ENV
export ROX_USERNAME=admin
export ROX_ADMIN_PASSWORD=$(cat ../deploy/k8s/central-deploy/password)
export API_ENDPOINT=localhost:8000
- Run cd tests; go test -run <TestName>
- From the command line, run cat ../deploy/k8s/central-deploy/password and record this.
- Go to Run > Edit Configurations
- Set Environment Variables to the following:
ROX_USERNAME=admin;ROX_ADMIN_PASSWORD=<Value from the first step>;API_ENDPOINT=localhost:8000;<More Env Vars Here>
- Save the configuration and Run the test(s)
- unset any environment variables (or just make a new Terminal window)
- Automated Setup and Cleanup
- Use a new namespace for any deployments to avoid the nginx clashing.