fix: use print() for JSON/version output to avoid ANSI codes in CI #91
Annotations
10 errors
|
test (3.12)
Process completed with exit code 1.
|
|
test (3.12):
tests/test_serve.py#L0
FAILED tests/test_serve.py::TestServeCLI::test_serve_help_shows_api_key_option - AssertionError: assert 'api-key' in '\x1b[1m \x1b[0m\n\x1b[1m \x1b[0m\x1b[1;33musage: \x1b[0m\x1b[1menvault serve [options]\x1b[0m\x1b[1m \x1b[0m\x1b[1m \x1b[0m\n\x1b[1m \x1b[0m\n start an http server that exposes decrypted secrets as a json api. \n \n \x1b[2mendpoints:\x1b[0m \n \n \x1b[2mget /secrets \u2014 list all secret keys\x1b[0m \n \n \x1b[2mget /secrets?prefix=x \u2014 filter keys by prefix\x1b[0m \n \n \x1b[2mget /secrets/{key} \u2014 get decrypted value for a key\x1b[0m \n \n \x1b[2mget /health \u2014 store connectivity check\x1b[0m \n \n \x1b[2m security:\x1b[0m \n \x1b[2m- default bind is 127.0.0.1 (localhost only); use \x1b[0m\x1b[1;2;36m-\x1b[0m\x1b[1;2;36m-host\x1b[0m\x1b[2m 0.0.0.0 to expose.\x1b[0m \n \x1b[2m- set \x1b[0m\x1b[1;2;36m-\x1b[0m\x1b[1;2;36m-api\x1b[0m\x1b[1;2;36m-key\x1b[0m\x1b[2m or envault_api_key to require bearer token auth on /secrets.\x1b[0m \n \x1b[2m \x1b[0m \n \n\x1b[2m\u256d\u2500\x1b[0m\x1b[2m options \x1b[0m\x1b[2m\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\x1b[0m\x1b[2m\u2500\u256e\x1b[0m\n\x1b[2m\u2502\x1b[0m \x1b[1;36m-\x1b[0m\x1b[1;36m-port\x1b[0m \x1b[1;32m-p\x1b[0m \x1b[1;33minteger\x1b[0m port to listen on \x1b[2m[default: 8080]\x1b[0m \x1b[2m\u2502\x1b[0m\n\x1b[2m\u2502\x1b[0m \x1b[1;36m-\x1b[0m\x1b[1;36m-host\x1b[0m \x1b[1;32m-h\x1b[0m \x1b[1;33mtext \x1b[0m bind address (default: localhost only) \x1b[2m\u2502\x1b[0m\n\x1b[2m\u2502\x1b[0m \x1b[2m[default: 127.0.0.1] \x1b[0m \x1b[2m\u2502\x1b[0m\n\x1b[2m\u2502\x1b[0m \x1b[1;36m-\x1b[0m\x1b[1;36m-password\x1b[0m \x1b[1;32m-k\x1b[0m \x1b[1;33mtext \x1b[0m encryption password (prompted if omitted, or \x1b[2m\u2502\x1b[0m\n\x1b[2m\u2502\x1b[0m use envault_encrypt_key) \x1b[2m\u2502\x1b[0m\n\x1b[2m\u2502\x1b[0m \x1b[1;36m-\x1b[0m\x1b[1;36m-api\x1b[0m\x1b[1;36m-key\x1b[0m \x1b[1;33mtext \x1b[0m bearer token for api auth (or set \x1b[2m\u2502\x1b[0m\n\x1b[2m\u2502\x1b[0m envault_api_key) \x1b[2m\u2502\x1b[0m\n\x1b[2m\u2502\x1b[0m \x1b[1;36m-\x1b[0m\x1b[1;36m-store\x1b[0m \x1b[1;32m-s\x1b[0m \x1b[1;33mtext \x1b[0m named store from config to use \x1b[2m\u2502\x1b[0m\n\x1b[2m\u2502\x1b[0m \x1b[1;36m-\x1b[0m\x1b[1;36m-config\x1b[0m \x1b[1;32m-c\x1b[0m \x1b[1;33mtext \x1b[0m config file path
|
|
test (3.12):
tests/test_serve.py#L0
assert result.exit_code == 0
|
|
test (3.12):
tests/test_serve.py#L0
result = runner.invoke(app, ["serve", "--help"])
|
|
test (3.12):
tests/test_serve.py#L0
runner = CliRunner()
|
|
test (3.12):
tests/test_serve.py#L0
from envault.cli import app
|
|
test (3.12):
tests/test_serve.py#L0
from typer.testing import CliRunner
|
|
test (3.12):
tests/test_serve.py#L0
"""serve --help should show the --api-key option."""
|
|
test (3.12):
tests/test_serve.py#L0
def test_serve_help_shows_api_key_option(self):
|
|
test (3.12)
Process completed with exit code 1.
|