aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvitalyisaev <vitalyisaev@yandex-team.com>2023-09-04 17:10:48 +0300
committervitalyisaev <vitalyisaev@yandex-team.com>2023-09-04 17:46:20 +0300
commite66c95c6ac3626a427da3f53707135d6e1f6dc82 (patch)
tree8e2526c02c36f6cd4b17a7c398791848dc7f6ff9
parent85e84d92745050b5e893862bf344e6958ef9e8e1 (diff)
downloadydb-e66c95c6ac3626a427da3f53707135d6e1f6dc82.tar.gz
Move forgotten run_testpack file to dir with S3 tests
-rwxr-xr-xydb/core/kqp/ut/federated_query/s3/run_testpack28
1 files changed, 28 insertions, 0 deletions
diff --git a/ydb/core/kqp/ut/federated_query/s3/run_testpack b/ydb/core/kqp/ut/federated_query/s3/run_testpack
new file mode 100755
index 0000000000..f5c59623c0
--- /dev/null
+++ b/ydb/core/kqp/ut/federated_query/s3/run_testpack
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+set -e
+CTX_DIR=$(mktemp -d)
+echo Working dir: $CTX_DIR
+cd "$CTX_DIR"
+
+# Start server
+MOTO_SERVER_EXECUTABLE=moto_server $source_root/ydb/tests/tools/s3_recipe/start.sh $CTX_DIR
+
+# Run test
+set +e
+S3_ENDPOINT=$(cat $CTX_DIR/env.json | grep 'S3_ENDPOINT' | cut -f 4 -d '"') \
+$build_root/ydb/core/kqp/ut/federated_query/s3/ydb-core-kqp-ut-federated_query-s3 $*
+
+code=$?
+if [ $code -gt 0 ];then
+ echo
+ echo "Test execution failed"
+ echo
+fi
+
+# Stop server (removes working dir!)
+$source_root/ydb/tests/tools/s3_recipe/stop.sh $CTX_DIR
+
+# Return result code from test run
+if [ $code -gt 0 ];then
+ exit $code
+fi