Use mock server for usage quota check in dev
What does this MR do and why?
Use mock server for usage quota check in dev
Use a mock server url https://gitlab.com/gitlab-org/ai-powered/mock-cred-cd when in development env duo to complexity of dealing with Customers dot portal.
References
https://gitlab.com/gitlab-org/gitlab/-/work_items/582179+
How to set up and validate locally
- Run the mock server
- In a rails console attempt to connect to the server with
Gitlab::SubscriptionPortal::Client.verify_usage_quota(user_id: ..., root_namespace_id: ...) - Use
Feature.enable(:use_mock_dot_api_for_usage_quota)ordisableto enable and disable the flag - When enabled it should contact the mock server, and when disabled it should contact the staging server
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Kaveh Nejad