Skip to content

Commit 93dda84

Browse files
- Amended robot test.
1 parent 85e7886 commit 93dda84

File tree

4 files changed

+20
-9
lines changed

4 files changed

+20
-9
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ jobs:
260260
- name: Set up Go 1.x
261261
uses: actions/[email protected]
262262
with:
263-
go-version: '~1.23'
263+
go-version: '~1.24'
264264
check-latest: true
265265
cache: true
266266
id: go
@@ -480,7 +480,7 @@ jobs:
480480
- name: Set up Go 1.x
481481
uses: actions/[email protected]
482482
with:
483-
go-version: '~1.23'
483+
go-version: '~1.24'
484484
check-latest: true
485485
cache: true
486486
id: go

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ COPY --from=registrymock /opt/test/stackql ${TEST_ROOT_DIR}/
135135

136136
COPY --from=builder /work/stackql/build/stackql ${TEST_ROOT_DIR}/build/
137137

138+
COPY --from=builder /work/stackql/build/stackql_mcp_client ${TEST_ROOT_DIR}/build/
139+
138140
RUN if [ "${RUN_INTEGRATION_TESTS}" = "1" ]; then env PYTHONPATH="$PYTHONPATH:${TEST_ROOT_DIR}/test/python" robot ${TEST_ROOT_DIR}/test/robot/functional; fi
139141

140142
FROM ubuntu:22.04 AS app
@@ -161,6 +163,8 @@ ENV PATH="${APP_DIR}:${PATH}"
161163

162164
COPY --from=integration ${TEST_ROOT_DIR}/build/stackql ${APP_DIR}/
163165

166+
COPY --from=integration ${TEST_ROOT_DIR}/build/stackql_mcp_client ${APP_DIR}/
167+
164168
RUN apt-get update \
165169
&& apt-get install -y ca-certificates openssl netcat-traditional jq dnsutils \
166170
&& update-ca-certificates

test/python/stackql_test_tooling/stackql_context.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from registry_cfg import RegistryCfg
1313

1414
_exe_name = 'stackql'
15+
_mcp_client_exe_name = 'stackql_mcp_client'
1516

1617
IS_WINDOWS = '0'
1718
if os.name == 'nt':
@@ -143,10 +144,16 @@ def get_json_from_local_file(fp :str) -> typing.Any:
143144
REPOSITORY_ROOT_UNIX = get_unix_path(repository_root)
144145

145146
def get_stackql_exe(execution_env :str, is_preinstalled :bool):
146-
_default_stackqk_exe = ' '.join(get_unix_path(os.path.join(repository_root, 'build', _exe_name)).splitlines())
147+
_default_stackql_exe = ' '.join(get_unix_path(os.path.join(repository_root, 'build', _exe_name)).splitlines())
147148
if is_preinstalled:
148149
return 'stackql'
149-
return _default_stackqk_exe
150+
return _default_stackql_exe
151+
152+
def get_stackql_mcp_client_exe(execution_env :str, is_preinstalled :bool):
153+
_default_stackql_mcp_client_exe = ' '.join(get_unix_path(os.path.join(repository_root, 'build', _mcp_client_exe_name)).splitlines())
154+
if is_preinstalled:
155+
return _mcp_client_exe_name
156+
return _default_stackql_mcp_client_exe
150157

151158
def get_registry_mocked(execution_env :str) -> RegistryCfg:
152159
return RegistryCfg(
@@ -941,6 +948,7 @@ def get_registry_mock_url(execution_env :str) -> str:
941948
'SQL_CLIENT_EXPORT_BACKEND': get_export_sql_backend(execution_env, sql_backend_str),
942949
'SQL_CLIENT_EXPORT_CONNECTION_ARG': get_export_sql_connection_arg(execution_env, sql_backend_str),
943950
'STACKQL_EXE': get_stackql_exe(execution_env, must_use_stackql_preinstalled),
951+
'STACKQL_MCP_CLIENT_EXE': get_stackql_mcp_client_exe(execution_env, must_use_stackql_preinstalled),
944952
'SUMOLOGIC_SECRET_STR': SUMOLOGIC_SECRET_STR,
945953
## queries and expectations
946954
'AWS_CC_VIEW_SELECT_PROJECTION_BUCKET_COMPLEX_EXPECTED': AWS_CC_VIEW_SELECT_PROJECTION_BUCKET_COMPLEX_EXPECTED,

test/robot/functional/mcp.robot

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
Resource ${CURDIR}/stackql.resource
33

44
*** Test Cases ***
5-
MCP HTTP Server List Tools
6-
Pass Execution If "${EXECUTION_PLATFORM}" == "docker" Skipping MCP test in docker
7-
${serverProcess}= Start Process ${REPOSITORY_ROOT}${/}build${/}stackql
5+
MCP HTTP Server List Tools
6+
${serverProcess}= Start Process ${STACKQL_EXE}
87
... mcp
98
... \-\-mcp.server.type\=http
109
... \-\-mcp.config
11-
... {"server": {"transport": "http", "address": "127.0.0.1:9912"} }
10+
... {"server": {"transport": "http", "address": "127.0.0.1:9912"} }
1211
Sleep 5s
13-
${result}= Run Process ${REPOSITORY_ROOT}${/}build${/}stackql_mcp_client
12+
${result}= Run Process ${STACKQL_MCP_CLIENT_EXE}
1413
... exec
1514
... \-\-client\-type\=http
1615
... \-\-url\=http://127.0.0.1:9912

0 commit comments

Comments
 (0)