Skip to content

Commit 3fceba5

Browse files
Copilotdata-douser
andauthored
Fix: skip codeql_pack_install test when --no-install-packs is passed
- Forward installPacks option to IntegrationTestRunner in ql-mcp-client.js - Skip codeql_pack_install tool test when installPacks === false to avoid network/SSL errors in environments without internet access (e.g. CI sandboxes) Fixes the one failing client integration test: codeql_pack_install/install_pack Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com> Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/1407288c-2bb4-42d4-adde-1c82cf1287f4
1 parent c470db8 commit 3fceba5

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

client/src/lib/integration-test-runner.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@ export class IntegrationTestRunner {
207207
this.logger.log(`Filtered to ${toolsToTest.length} tools: ${toolsToTest.join(", ")}`);
208208
}
209209

210+
// Skip codeql_pack_install test when --no-install-packs is passed, because the
211+
// tool requires network access to download pack dependencies which may not be
212+
// available in all environments (e.g. CI sandboxes with restricted internet).
213+
if (this.options.installPacks === false) {
214+
toolsToTest = toolsToTest.filter((tool) => tool !== "codeql_pack_install");
215+
this.logger.log("Skipping codeql_pack_install test (--no-install-packs)", "WARN");
216+
}
217+
210218
this.logger.log(`Executing tests in priority order: ${toolsToTest.join(", ")}`);
211219

212220
// Run tests for each tool in priority order

client/src/ql-mcp-client.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ class CodeQLMCPClient {
155155
this.mcpTestSuite = new MCPTestSuite(this.client, this.logger);
156156
this.integrationTestRunner = new IntegrationTestRunner(this.client, this.logger, {
157157
tools: this.options.tools,
158-
tests: this.options.tests
158+
tests: this.options.tests,
159+
installPacks: this.options.installPacks
159160
});
160161
this.monitoringTestRunner = new MonitoringIntegrationTestRunner(this.client, this.logger);
161162

0 commit comments

Comments
 (0)