Add --base-url flag for connector testability#19
Add --base-url flag for connector testability#19robert-chiniquy wants to merge 3 commits intomainfrom
Conversation
This change adds a --base-url CLI flag to allow overriding the default API endpoint for testing purposes. When provided, the connector will use this URL instead of the hardcoded production API URL. This is part of the Connector Testability initiative to enable mock server testing without modifying connector code. Files changed: cmd/baton-cloudflare-zero-trust/config.go,cmd/baton-cloudflare-zero-trust/main.go,pkg/connector/connector.go
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
russellhaering
left a comment
There was a problem hiding this comment.
LGTM - base-url flag implementation looks correct. Cleanest approach of the batch -- leverages cloudflare-go SDK's native BaseURL option, correctly applied to both API key and API token auth paths.
base-url is a dev/testing concern, not user-facing configuration. Mark it WithHidden(true) so it doesn't appear in the hosted UI. Good feedback from Geoff: ConductorOne/baton-trayai#63 (comment)
Summary
Adds the
--base-urlCLI flag to enable overriding the default API endpoint for testing purposes.Changes
BaseURLFieldto configuration--base-urlis provided, it takes precedence over the default API URLFiles Modified
Testing
The connector can now be tested against mock servers:
Related
Part of the Connector Testability initiative.
Summary by CodeRabbit