-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[close #232] Add https for tikv sink #233
Merged
Merged
Changes from 6 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a9f9c32
add https for tikv-sink
zeminzhou 8bdc7a6
fix ut
zeminzhou 9b78a3e
Merge branch 'main' into sink-https
zeminzhou 715827c
fix comment
zeminzhou 077ec75
fix comment
zeminzhou ed4beb8
remove len check
zeminzhou 1f07545
Merge branch 'main' into sink-https
zeminzhou 2c72f5b
Merge branch 'main' into sink-https
pingyu a77caa4
add https for tikv-sink
zeminzhou 2edb430
.
zeminzhou 34df9ab
fix check
zeminzhou 4419205
Merge branch 'main' into sink-https
zeminzhou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
CUR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
source $CUR/../_utils/test_prepare | ||
WORK_DIR=$OUT_DIR/$TEST_NAME | ||
TLS_DIR=$(cd $CUR/../_certificates && pwd) | ||
CDC_BINARY=tikv-cdc.test | ||
SINK_TYPE=$1 | ||
UP_PD=http://$UP_PD_HOST_1:$UP_PD_PORT_1 | ||
DOWN_PD=https://$TLS_PD_HOST:$TLS_PD_PORT | ||
|
||
function run() { | ||
rm -rf $WORK_DIR && mkdir -p $WORK_DIR | ||
|
||
start_tidb_cluster --workdir $WORK_DIR | ||
start_tls_tidb_cluster --workdir $WORK_DIR --tlsdir $TLS_DIR | ||
|
||
cd $WORK_DIR | ||
|
||
# record tso before we create tables to skip the system table DDLs | ||
start_ts=$(tikv-cdc cli tso query --pd=$UP_PD) | ||
sleep 10 | ||
run_cdc_server --workdir $WORK_DIR --binary $CDC_BINARY | ||
|
||
case $SINK_TYPE in | ||
tikv) SINK_URI="tikv://${TLS_PD_HOST}:${TLS_PD_PORT}/?ca-path=$TLS_DIR/ca.pem&cert-path=$TLS_DIR/client.pem&key-path=$TLS_DIR/client-key.pem" ;; | ||
*) SINK_URI="" ;; | ||
esac | ||
|
||
tikv-cdc cli changefeed create --start-ts=$start_ts --sink-uri=$SINK_URI | ||
|
||
rawkv_op $UP_PD put 10000 | ||
check_sync_diff $WORK_DIR $UP_PD $DOWN_PD | ||
rawkv_op $UP_PD delete 10000 | ||
check_sync_diff $WORK_DIR $UP_PD $DOWN_PD | ||
|
||
cleanup_process $CDC_BINARY | ||
} | ||
|
||
trap stop_tidb_cluster EXIT | ||
run $* | ||
check_logs $WORK_DIR | ||
echo "[$(date)] <<<<<< run test case $TEST_NAME success! >>>>>>" |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could
CA
CERT
andKEY
be set by config file?