SchemaLock adapter: support multiple base URLs (staging + prod) - #65
Open
qiaobochi040726-source wants to merge 2 commits into
Open
Conversation
Issue BreachDirect#20: run the same contract checks against multiple environments in a single run and label findings by environment. - base_urls dict {env: url} -> one schemalock test per URL, findings tagged with the env key (e.g. 'staging: GET /escrows/{id}') - base_urls list of URLs -> each URL tested, URL used as the env label - legacy single base_url still works unchanged (single invocation) - tests mock subprocess.run: two URLs -> two CLI calls + labelled findings, dict env keys used as labels, legacy base_url -> single call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20
SchemaLock 一次运行支持多个环境,findings 标注环境:
_resolve_base_urls()统一解析三种形态:base_urls dict {env: url}(标签=env key)、base_urls list(标签=URL)、旧单值 base_url(兼容,标签=URL)验证:pytest 18 passed(基线 15+3)。遗留:旧单值写法的 findings 现带 URL 前缀(格式轻微变化,数量与调用行为不变);某环境 CLI 缺失会中断整次运行(未做部分失败继续)。