This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Showing
3 changed files
with
54 additions
and
2 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,36 @@ | ||
#!/bin/bash | ||
|
||
function check_task_wrong_arg() { | ||
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ | ||
"check-task" \ | ||
"check-task <config_file> \[flags\]" 1 | ||
} | ||
|
||
function check_task_wrong_config_file() { | ||
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ | ||
"check-task not_exists_config_file" \ | ||
"get file content error" 1 | ||
} | ||
|
||
# run this check if DM-master is not available | ||
function check_task_fail() { | ||
task_conf=$1 | ||
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ | ||
"check-task $task_conf" \ | ||
"fail to check task" 1 | ||
} | ||
|
||
function check_task_pass() { | ||
task_conf=$1 | ||
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ | ||
"check-task $task_conf" \ | ||
"\"msg\": \"check pass!!!\"" 1 \ | ||
"\"result\": true" 1 | ||
} | ||
|
||
function check_task_not_pass() { | ||
task_conf=$1 | ||
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \ | ||
"check-task $task_conf" \ | ||
"\"result\": false" 1 | ||
} |
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 @@ | ||
--- | ||
description: "invalid task config" |
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