fix(plugins): detect Context7 managed by MCPorter
CI / Capabilities and shell quality (push) Successful in 12s
CI / Python tests and compilation (push) Successful in 22s
CI / CI configuration security checks (push) Successful in 4s
CI / Build and inspect generated packages (push) Successful in 13s
CI / PowerShell tests on Ubuntu (push) Successful in 1m10s
CI / Bash integration and installation guards (push) Successful in 1m38s
CI / Installed client configuration smoke tests (push) Successful in 13s
CI / Qwen retrieval integration (push) Successful in 14m24s
CI / Capabilities and shell quality (push) Successful in 12s
CI / Python tests and compilation (push) Successful in 22s
CI / CI configuration security checks (push) Successful in 4s
CI / Build and inspect generated packages (push) Successful in 13s
CI / PowerShell tests on Ubuntu (push) Successful in 1m10s
CI / Bash integration and installation guards (push) Successful in 1m38s
CI / Installed client configuration smoke tests (push) Successful in 13s
CI / Qwen retrieval integration (push) Successful in 14m24s
This commit is contained in:
1 parent
728d72312f
commit
280292d72e
4 files changed
+85
-7
No files matched your search
@@ -14,8 +14,9 @@ root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
|
||||
# shellcheck disable=SC2034
|
||||
names=(A B C)
|
||||
checked=(true false true)
|
||||
toggle_log=$(mktemp)
|
||||
trap 'rm -f -- "$toggle_log"' EXIT
|
||||
toggle_log=$(mktemp "$root/.plugin-toggle.XXXXXX")
|
||||
test_home=$(mktemp -d "$root/.context7-test.XXXXXX")
|
||||
trap 'rm -f -- "$toggle_log" "$test_home/.mcporter/mcporter.json"; rmdir -- "$test_home/.mcporter" "$test_home" 2>/dev/null || true' EXIT
|
||||
read_plugin_toggle_selection names checked <<< $'1\n2\ndone' > "$toggle_log"
|
||||
[ "$summary" = true ] || cat "$toggle_log"
|
||||
|
||||
@@ -36,6 +37,17 @@ if diagnostics=$(summary=true run_plugin_command false test_plugin_output fail 2
|
||||
exit 1
|
||||
fi
|
||||
[[ "$diagnostics" == *'download progress'* ]] && [[ "$diagnostics" == *'WARN test warning'* ]]
|
||||
mkdir -p "$test_home/.mcporter"
|
||||
printf '%s\n' '{"mcpServers":{"context7":{"baseUrl":"https://mcp.context7.com/mcp"}}}' > "$test_home/.mcporter/mcporter.json"
|
||||
home_path=$test_home
|
||||
plugin_installed() { return 1; }
|
||||
selected=()
|
||||
deselected=()
|
||||
select_configured_plugins "$root" codex Update true selected deselected
|
||||
[[ " ${selected[*]} " == *' Context7 '* ]] || { printf 'MCPorter Context7 must start checked when updating.\n' >&2; exit 1; }
|
||||
printf '%s\n' '{"mcpServers":{"context7":{"baseUrl":"https://example.invalid/mcp"}}}' > "$test_home/.mcporter/mcporter.json"
|
||||
select_configured_plugins "$root" codex Update true selected deselected
|
||||
[[ " ${deselected[*]} " == *' Context7 '* ]] || { printf 'A different MCPorter server must not select Context7.\n' >&2; exit 1; }
|
||||
# shellcheck disable=SC2034
|
||||
selected=()
|
||||
plugin_installed() { printf 'Empty selection must not query installed plugins.\n' >&2; exit 1; }
|
||||
|
||||
Reference in new issue
Block a user