COMPONENTS
FORGE
API client to interact with target forge, for which
shared-hosting is provided. Base class and Gitea implementation
in check/forge.py
PAYMENT VALIDATOR
API client to interact with payments backed. It tells if a user
is a paying customer or not. Defined in check/payment.py
ALERT
Alerting API that is called when a policy violation is
discovered. Defined in check/alert.py
An alert will include a message code and related data. All types
of alerts should have unique message codes.
WARNING
Using an undefined message code will result in raise
exceptions
POLICY
Features that are available to paying customers only. Defined in
check/policy.py
USER POLICY
- Only paying customers are allowed to create non-fork repositories
- Non-paying customers are allowed to fork paying customers'
repositories
- Forks chain should contain at least one paying customer
ORG POLICY
- At least 50% members of an organisation should be paying customers
TESTING STRATEGY
Tests use dummy substitutes for `forge` API client, `payment
validator` and the `alert` client.
DATA
- Test forge data is hard-coded and verified in
check/tests/test_forge.py.
- Paying customer information is hard-coded in test_factory
We run policies using this data and verify results