Library to help testing checker scripts based on enochecker
Project description
enochecker_test

Automatically test services/checker using the enochecker API
Usage
enochecker_test can be used to run tests against a checker, optionally you can specify wich tests to run e.g. enochecker_test test_getflag[0] test_exploit_per_exploit_id will run only the first getflag test and all exploit_per_exploit_id tests.
usage: enochecker_test [-h] [-a CHECKER_ADDRESS] [-p {1..65535}] [-A SERVICE_ADDRESS] [testexpr]
Utility for testing checkers that implement the enochecker API
positional arguments:
testexpr Specify the tests that should be run in the syntax expected by pytests -k flag, e.g. 'test_getflag' or 'not exploit'. If no expr is specified, all tests will be run.
optional arguments:
-h, --help show this help message and exit
-a CHECKER_ADDRESS, --checker-address CHECKER_ADDRESS
The address on which the checker is listening (defaults to the ENOCHECKER_TEST_CHECKER_ADDRESS environment variable)
-p {1..65535}, --checker-port {1..65535}
The port on which the checker is listening (defaults to ENOCHECKER_TEST_CHECKER_PORT environment variable)
-A SERVICE_ADDRESS, --service-address SERVICE_ADDRESS
The address on which the checker can reach the service (defaults to ENOCHECKER_TEST_SERVICE_ADDRESS environment variable)
Example Usage:
$ enochecker_test -a localhost -p 5008 -A 172.20.0.1 test_putflag
Assuming that 172.20.0.1 is the ip address of the gateway of the network of the
service's docker container as obtained by e.g:
$ docker network inspect service_default | jq ".[].IPAM.Config[].Gateway"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file enochecker_test-0.10.1.tar.gz.
File metadata
- Download URL: enochecker_test-0.10.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93e65c5caea071dfdca66998173a76418bc91866a44cda8bc17e951df7fc7e23
|
|
| MD5 |
08a226a612c69d5521887f69cf962ac9
|
|
| BLAKE2b-256 |
2db4af5d05e01880f162b1fcb6e673e172de297ae1d4070d0abf083ddb52d446
|
File details
Details for the file enochecker_test-0.10.1-py3-none-any.whl.
File metadata
- Download URL: enochecker_test-0.10.1-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a2992d84f21544ab7d248415b313f0abf0f649856846cf45dba90d592c0d280
|
|
| MD5 |
2bc11e3395e7e8b7d06dee9e2c151ec1
|
|
| BLAKE2b-256 |
8b76c800986f9e3fdb551e267a13f6b5cbdfeb572d9a3fefc74c4098aa78dda6
|