π§βπ» DevelopmentΒΆ
SetupΒΆ
Create a virtual environment, and install CertBob with its development dependencies:
make venv
source .venv/bin/activate
make develop
Development serverΒΆ
Start the development server on port 8000:
make server
Without a CA_URL, the development server issues certificates via an in-memory fake CA (see FAKE_CA), so no smallstep CA is required.
To use a real CA instead, set the CA_URL, CA_FINGERPRINT & PROVISIONER_PASSWORD variables.
The development server provides these local users:
Username |
Password |
Role |
|---|---|---|
|
|
Local admin |
|
|
Local user |
Hint
All variables of the development server (e.g. PORT, LOCAL_USERS, LOCAL_ADMINS or SERVICES_SECRET) can be overridden via the environment.
Its data (e.g. the service requests) is stored in the .dev/ directory.
Danger
Never enable the fake CA in production, itβs regenerated on every start.
TestsΒΆ
Run all tests (commit messages, linters & pytest) with:
make test
The pytest tests are located in confirm/certbob/tests, and can also be run on their own with make test-pytest.
Note
The tests are isolated from the environment, i.e. the variables CertBob reads are reset in the root conftest.py.
They also fail when they resolve hostnames, connect to the network, or run commands (e.g. the step CLI), unless these calls are mocked.