Metadata-Version: 2.4
Name: enochecker_test
Version: 0.14.1
Summary: Library to help test checker scripts based on enochecker
Author-email: Louis Burda <dev@sinitax.com>, Lucas Druschke <ldruschk@posteo.de>
License-Expression: MIT
Project-URL: homepage, https://github.com/enowars/enochecker_test
Project-URL: repository, https://github.com/enowars/enochecker_test
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: docker>=7.1.0
Requires-Dist: jsons~=1.6.3
Requires-Dist: pytest>=8.2.2
Requires-Dist: pytest-asyncio>=1.3.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: enochecker-core>=0.13.0
Requires-Dist: opentelemetry-api>=1.39.1
Requires-Dist: opentelemetry-sdk>=1.39.1
Requires-Dist: opentelemetry-exporter-otlp>=1.39.1
Requires-Dist: opentelemetry-instrumentation-httpx>=0.60b1
Dynamic: license-file

# 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` will run only the first `getflag` test and all `test_exploit` 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"
```
