Installing the Whiteblock Genesis CLI
The Whiteblock Genesis CLI is open source and available for download from our Github repository.
Once you’ve downloaded the Whiteblock Genesis CLI, run the following command to see some of the environment variables provided to your container:
genesis env <file>
The Genesis platform provides environment variables to give you the IP addresses of services in the network. All environment variables for IPs will be in all caps and also have
- replaced with an underscore. The platform also provides many other environment variables to enchance your experience.
The environment variables for the IP addresses of Services will be of the following format:
So, if you have a service
foo-baz on the network
bar, then the first instance’s IP address would be given in the environment variable
The naming of environment variables for sidecars is very similar to that of Services, with a few differences:
- The service’s IP in the sidecar network will be the instance name of service, i.e.,
- The sidecars’ IP environment variables are formatted as though the service is their network. For example, to find the IP of a sidecar
soap-barto the 0th service instance of
foo-baz, you would check the value of
Additionally, sidecars will have the env var “SERVICE”, which will have the IP of its service in the network.
INDEXthe index of the service e.g. 1
INDEX_J2the index of the service justified to 2 spaces e.g. 01
INDEX_J3the index of the service justified to 3 spaces e.g. 001
NAMEthe unique name of the service
SERVICEonly for sidecars; contains the IP of the corresponding service
Running Tests from the CLI
Once you’ve created a test definition to run, you can run them using our CLI tool with the following command:
genesis run <test-definition.yml>
test-definition.yml is the path to your test definition file on your local filesystem.
Understanding Test Results
On completion, tests will have one of the statuses below
|Passed||yes||Indicates that your test ran successfully and no tasks exited with a nonzero exit code.|
|Failed||no||Indicates that one or more tasks exited with a nonzero exit code during one of your test phases.|
|Timeout||no||Indicates that one or more tasks didn’t exit before the timeout specified. Note that a default timeout of 2 minutes is enforced if no other timeout is specified.|
|Error||no||(rare) Indicates that your test could not start, or once started, your test could not be run to completion due to some error in the Whiteblock Genesis platform.|