|
| 1 | +*** Variables *** |
| 2 | +${REPOSITORY_ROOT} ${CURDIR}${/}..${/}..${/}..${/}.. |
| 3 | +${CORE_REPOSITORY_ROOT} ${REPOSITORY_ROOT}${/}stackql-core |
| 4 | +${CORE_LIB_HOME} ${CORE_REPOSITORY_ROOT}${/}test${/}robot${/}lib |
| 5 | +${LOCAL_LIB_HOME} ${CURDIR}${/}..${/}..${/}lib |
| 6 | +${EXECUTION_PLATFORM} native # to be overridden from command line, eg "docker" |
| 7 | +${SQL_BACKEND} sqlite_embedded # to be overridden from command line, eg "postgres_tcp" |
| 8 | +${IS_WSL} false # to be overridden from command line, with string "true" |
| 9 | +${SHOULD_RUN_DOCKER_EXTERNAL_TESTS} false # to be overridden from command line, with string "true" |
| 10 | +${CONCURRENCY_LIMIT} 1 # to be overridden from command line, with integer value, -1 for no limit |
| 11 | +${USE_STACKQL_PREINSTALLED} false # to be overridden from command line, with string "true" |
| 12 | +${SUNDRY_CONFIG} {} # to be overridden from command line, with string value |
| 13 | +${CORE_PREFIX} stackql-core |
| 14 | + |
| 15 | +*** Settings *** |
| 16 | +Library Process |
| 17 | +Library OperatingSystem |
| 18 | +Variables ${CORE_LIB_HOME}/stackql_context.py ${EXECUTION_PLATFORM} ${SQL_BACKEND} ${USE_STACKQL_PREINSTALLED} |
| 19 | +... ${SUNDRY_CONFIG} |
| 20 | +Library Process |
| 21 | +Library OperatingSystem |
| 22 | +Library String |
| 23 | +Library ${CORE_LIB_HOME}/StackQLInterfaces.py ${EXECUTION_PLATFORM} ${SQL_BACKEND} ${CONCURRENCY_LIMIT} |
| 24 | +Library ${CORE_LIB_HOME}/CloudIntegration.py |
| 25 | + |
| 26 | +*** Keywords *** |
| 27 | + |
| 28 | + |
| 29 | +Prepare StackQL Environment |
| 30 | + Sleep 10s |
| 31 | + |
| 32 | +Stock Stackql Exec Inline Equals Both Streams |
| 33 | + [Arguments] ${inputStr} ${outputStr} ${outputStderrStr} ${tmpFileTrunk} |
| 34 | + Should Stackql Exec Inline Equal Both Streams |
| 35 | + ... ${STACKQL_EXE} |
| 36 | + ... ${OKTA_SECRET_STR} |
| 37 | + ... ${GITHUB_SECRET_STR} |
| 38 | + ... ${K8S_SECRET_STR} |
| 39 | + ... ${REGISTRY_NO_VERIFY_CFG_STR} |
| 40 | + ... {} |
| 41 | + ... ${SQL_BACKEND_CFG_STR_CANONICAL} |
| 42 | + ... ${inputStr} |
| 43 | + ... ${outputStr} |
| 44 | + ... ${outputStderrStr} |
| 45 | + ... stdout=${CURDIR}${/}tmp${/}${tmpFileTrunk}.tmp |
| 46 | + ... stderr=${CURDIR}${/}tmp${/}${tmpFileTrunk}-stderr.tmp |
| 47 | + |
| 48 | +Stock Stackql Exec Inline Contains Both Streams |
| 49 | + [Arguments] ${inputStr} ${outputStr} ${outputStderrStr} ${tmpFileTrunk} |
| 50 | + Should Stackql Exec Inline Contain Both Streams |
| 51 | + ... ${STACKQL_EXE} |
| 52 | + ... ${OKTA_SECRET_STR} |
| 53 | + ... ${GITHUB_SECRET_STR} |
| 54 | + ... ${K8S_SECRET_STR} |
| 55 | + ... ${REGISTRY_NO_VERIFY_CFG_STR} |
| 56 | + ... {} |
| 57 | + ... ${SQL_BACKEND_CFG_STR_CANONICAL} |
| 58 | + ... ${inputStr} |
| 59 | + ... ${outputStr} |
| 60 | + ... ${outputStderrStr} |
| 61 | + ... stdout=${CURDIR}${/}tmp${/}${tmpFileTrunk}.tmp |
| 62 | + ... stderr=${CURDIR}${/}tmp${/}${tmpFileTrunk}-stderr.tmp |
| 63 | + |
| 64 | + |
| 65 | +Stackql Per Test Teardown |
| 66 | + IF "${EXECUTION_PLATFORM}" == "docker" and "${SQL_BACKEND}" == "postgres_tcp" |
| 67 | + ${res} = Run Process bash \-c docker kill $(docker ps \-\-filter name\=execrun \-q) |
| 68 | + Log Container killed |
| 69 | + # Should Be Equal As Integers ${res.rc} 0 |
| 70 | + ${restwo} = Run Process bash \-c docker rm $(docker ps \-\-filter status\=exited \-q) |
| 71 | + Log Container removed |
| 72 | + # Should Be Equal As Integers ${restwo.rc} 0 |
| 73 | + END |
0 commit comments