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.
- Loading branch information
1 parent
b875fca
commit 9bfe7ba
Showing
6 changed files
with
51 additions
and
8 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
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
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 |
---|---|---|
|
@@ -14,4 +14,4 @@ | |
|
||
mod kvapi; | ||
|
||
pub use kvapi::KvApi; | ||
pub use kvapi::KvApiCommand; |
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,8 @@ | ||
# Data for testing databend-meta kvapi commands | ||
|
||
|
||
In the databend root dir: | ||
|
||
``` | ||
sh ./tests/meta-kvapi/test-meta-kvapi.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,32 @@ | ||
#!/bin/sh | ||
|
||
set -o errexit | ||
|
||
BUILD_PROFILE="${BUILD_PROFILE:-debug}" | ||
DATABEND_META="./target/${BUILD_PROFILE}/databend-meta" | ||
|
||
echo " === start a single node databend-meta" | ||
chmod +x ${DATABEND_META} | ||
${DATABEND_META} --single & | ||
METASRV_PID=$! | ||
echo $METASRV_PID | ||
|
||
echo " === test kvapi::upsert" | ||
${DATABEND_META} --grpc-api-address "127.0.0.1:9191" --cmd kvapi::upsert --key 1:key1 --value value1 | ||
${DATABEND_META} --grpc-api-address "127.0.0.1:9191" --cmd kvapi::upsert --key 1:key2 --value value2 | ||
${DATABEND_META} --grpc-api-address "127.0.0.1:9191" --cmd kvapi::upsert --key 1:key3 --value value3 | ||
${DATABEND_META} --grpc-api-address "127.0.0.1:9191" --cmd kvapi::upsert --key 2:key1 --value value1 | ||
${DATABEND_META} --grpc-api-address "127.0.0.1:9191" --cmd kvapi::upsert --key 2:key2 --value value2 | ||
|
||
echo " === test kvapi::get" | ||
${DATABEND_META} --grpc-api-address "127.0.0.1:9191" --cmd kvapi::get --key 1:key1 | ||
${DATABEND_META} --grpc-api-address "127.0.0.1:9191" --cmd kvapi::get --key 2:key2 | ||
|
||
echo " === test kvapi::mget" | ||
${DATABEND_META} --grpc-api-address "127.0.0.1:9191" --cmd kvapi::mget --key 1:key1 2:key2 | ||
|
||
echo " === test kvapi::list" | ||
${DATABEND_META} --grpc-api-address "127.0.0.1:9191" --cmd kvapi::list --prefix 1: | ||
${DATABEND_META} --grpc-api-address "127.0.0.1:9191" --cmd kvapi::list --prefix 2: | ||
|
||
kill $METASRV_PID |