forked from databendlabs/databend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add ee management mode test (databendlabs#14188)
add ee management mode test
- Loading branch information
Showing
5 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: "Test ee management mode" | ||
description: "Running stateless tests in management mode" | ||
inputs: | ||
target: | ||
description: "" | ||
required: true | ||
default: "x86_64-unknown-linux-gnu" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: ./.github/actions/setup_bendsql | ||
- name: Download artifact | ||
uses: ./.github/actions/artifact_download | ||
with: | ||
sha: ${{ github.sha }} | ||
target: ${{ inputs.target }} | ||
|
||
- name: Run Stateful Tests with Standalone mode | ||
shell: bash | ||
run: | | ||
./scripts/ci/ci-run-ee-tests-management-mode.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
# Copyright 2020-2021 The Databend Authors. | ||
# SPDX-License-Identifier: Apache-2.0. | ||
|
||
set -e | ||
|
||
export STORAGE_ALLOW_INSECURE=true | ||
|
||
echo "calling test suite" | ||
echo "Starting standalone DatabendQuery(debug)" | ||
./scripts/ci/deploy/databend-query-management-mode.sh | ||
|
||
SCRIPT_PATH="$(cd "$(dirname "$0")" >/dev/null 2>&1 && pwd)" | ||
cd "$SCRIPT_PATH/../../tests" || exit | ||
|
||
echo "Starting databend-test" | ||
./databend-test $1 --mode 'standalone' --run-dir management |
2 changes: 2 additions & 0 deletions
2
tests/suites/7_management/00_stream_status/00_0000_stream_status.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
true | ||
false |
20 changes: 20 additions & 0 deletions
20
tests/suites/7_management/00_stream_status/00_0000_stream_status.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
. "$CURDIR"/../../../shell_env.sh | ||
|
||
echo "drop database if exists db_stream" | $BENDSQL_CLIENT_CONNECT | ||
|
||
echo "CREATE DATABASE db_stream" | $BENDSQL_CLIENT_CONNECT | ||
echo "create table db_stream.t(a int)" | $BENDSQL_CLIENT_CONNECT | ||
echo "create stream default.s1 on table db_stream.t comment = 'test'" | $BENDSQL_CLIENT_CONNECT | ||
echo "create stream db_stream.s2 on table db_stream.t comment = 'test'" | $BENDSQL_CLIENT_CONNECT | ||
|
||
# When s1 is created, t automatically turns on change tracking. So the offset of s1 and the version of t do not match. | ||
curl -X GET -s http://localhost:8081/v1/tenants/system/stream_status\?stream_name=s1 | jq .has_data | ||
curl -X GET -s http://localhost:8081/v1/tenants/system/stream_status\?stream_name\=s2\&database\=db_stream | jq .has_data | ||
|
||
echo "drop stream if exists default.s1" | $BENDSQL_CLIENT_CONNECT | ||
echo "drop stream if exists db_stream.s2" | $BENDSQL_CLIENT_CONNECT | ||
echo "drop table if exists db_stream.t" | $BENDSQL_CLIENT_CONNECT | ||
echo "drop database if exists db_stream" | $BENDSQL_CLIENT_CONNECT |