Skip to content

Commit a81baad

Browse files
- Added robot test PG Session Debug Off Behaviour Canonical.
1 parent 755a3c8 commit a81baad

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

test/robot/functional/stackql.resource

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ Start StackQL PG Server unencrypted
146146
... \-\-tls\.allowInsecure\=true
147147
... \-\-pgsrv\.address\=0.0.0.0
148148
... \-\-pgsrv\.port\=${_SRV_PORT_UNENCRYPTED}
149-
... \-\-pgsrv\.debug\.enable\=true
150149
... \-\-namespaces\=${_NAMESPACES_CFG}
151150
... \-\-sqlBackend\=${_SQL_BACKEND_CFG}
152151
... \-\-dbInternal\=${DB_INTERNAL_CFG_LAX}
@@ -161,7 +160,7 @@ Start StackQL PG Server unencrypted
161160
... stackqlsrv
162161
... bash
163162
... \-c
164-
... sleep 2 && stackql srv \-\-execution\.concurrency\.limit\=${CONCURRENCY_LIMIT} \-\-registry\='${REGISTRY_NO_VERIFY_CFG_STR.get_config_str('docker')}' \-\-auth\='${AUTH_CFG_STR}' \-\-namespaces\='${_NAMESPACES_CFG}' \-\-sqlBackend\='${_SQL_BACKEND_CFG}' \-\-dbInternal\='${DB_INTERNAL_CFG_LAX}' \-\-tls\.allowInsecure\=true \-\-pgsrv\.address\=0.0.0.0 \-\-pgsrv\.port\=${PG_SRV_PORT_DOCKER_UNENCRYPTED} \-\-pgsrv\.debug\.enable\=true
163+
... sleep 2 && stackql srv \-\-execution\.concurrency\.limit\=${CONCURRENCY_LIMIT} \-\-registry\='${REGISTRY_NO_VERIFY_CFG_STR.get_config_str('docker')}' \-\-auth\='${AUTH_CFG_STR}' \-\-namespaces\='${_NAMESPACES_CFG}' \-\-sqlBackend\='${_SQL_BACKEND_CFG}' \-\-dbInternal\='${DB_INTERNAL_CFG_LAX}' \-\-tls\.allowInsecure\=true \-\-pgsrv\.address\=0.0.0.0 \-\-pgsrv\.port\=${PG_SRV_PORT_DOCKER_UNENCRYPTED}
165164
... stderr=${CURDIR}/tmp/stdout-stackql-srv-unencrypted-${_SRV_PORT_UNENCRYPTED}.txt
166165
... stdout=${CURDIR}/tmp/stderr-stackql-srv-unencrypted-${_SRV_PORT_UNENCRYPTED}.txt
167166
END

test/robot/functional/stackql_sessions.robot

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ Unacceptable Insecure PSQL Connection to mTLS Server Returns Error Message
395395
Should Contain ${result.stderr} server closed the connection unexpectedly
396396

397397
PG Session Debug Behaviour Canonical
398+
[Documentation] The mTLS servers have debug on
398399
Set Environment Variable PGHOST ${PSQL_CLIENT_HOST}
399400
Set Environment Variable PGPORT ${PG_SRV_PORT_MTLS}
400401
Set Environment Variable PGSSLMODE verify\-full
@@ -434,3 +435,34 @@ PG Session Debug Behaviour Canonical
434435
... AND Remove Environment Variable PGSSLKEY
435436
... AND Remove Environment Variable PGSSLROOTCERT
436437

438+
PG Session Debug Off Behaviour Canonical
439+
[Documentation] The unencrypted servers have debug off
440+
Set Environment Variable PGHOST ${PSQL_CLIENT_HOST}
441+
Set Environment Variable PGPORT ${PG_SRV_PORT_UNENCRYPTED}
442+
Set Environment Variable PGUSER stackql
443+
Set Environment Variable PGPASSWORD ${PSQL_PASSWORD}
444+
${inputStr} = Catenate
445+
... SELECT repo, count(1) as has_starred
446+
... FROM github.activity.repo_stargazers
447+
... WHERE owner = 'sillyorg' and repo in ('silly', 'silly-but-more') and login = 'sillylogin'
448+
... GROUP BY repo;
449+
${outputStr} = Catenate SEPARATOR=\n
450+
... repo | has_starred
451+
... ------+-------------
452+
... (0 rows)
453+
${posixInput} = Catenate
454+
... "${PSQL_EXE}" -c "${inputStr}"
455+
${windowsInput} = Catenate
456+
... & ${posixInput}
457+
${input} = Set Variable If "${IS_WINDOWS}" == "1" ${windowsInput} ${posixInput}
458+
${shellExe} = Set Variable If "${IS_WINDOWS}" == "1" powershell sh
459+
${result} = Run Process
460+
... ${shellExe} \-c ${input}
461+
... stdout=${CURDIR}/tmp/PG-Session-Debug-Off-Behaviour-Canonical.tmp
462+
... stderr=${CURDIR}/tmp/PG-Session-Debug-Off-Behaviour-Canonical-stderr.tmp
463+
Should Contain ${result.stdout} ${outputStr} collapse_spaces=True
464+
Should Be Empty ${result.stderr}
465+
[Teardown] Run Keywords Remove Environment Variable PGHOST
466+
... AND Remove Environment Variable PGPORT
467+
... AND Remove Environment Variable PGUSER
468+
... AND Remove Environment Variable PGPASSWORD

0 commit comments

Comments
 (0)