Skip to content

Latest commit

 

History

History

tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Platform API Tests

This framework is designed to run End-to-End API tests

How to Run tests

Note: These tests always run on CI unless explicitly labeled otherwise.

Pre-Test Steps

  1. Run make -C .. proto-generated-srcs to make sure the protos are up-to-date
  2. 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.

From Command Line

  1. 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
  2. Run cd tests; go test -run <TestName>

From Goland IDE

  1. From the command line, run cat ../deploy/k8s/central-deploy/password and record this.
  2. Go to Run > Edit Configurations
  3. 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>
  4. Save the configuration and Run the test(s)

Cleanup

  1. unset any environment variables (or just make a new Terminal window)

TODO

  1. Automated Setup and Cleanup
  2. Use a new namespace for any deployments to avoid the nginx clashing.