This website requires JavaScript.
Explore
Help
Sign In
Gna
/
shared-hosting
Watch
3
Star
0
Fork
You've already forked shared-hosting
0
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
master
shared-hosting
/
check
/
tests
/
test_non_paying.py
2 lines
1 B
Raw
Permalink
Normal View
History
Unescape
Escape
feat: validate with user and org policy and tests 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
2022-09-18 19:04:38 +00:00