-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
40602: cli: Add some tests for the locality setting features of cockroach demo r=knz a=rohany Added some tests for locality settings in cockroach demo. Release justification: Low risk tests for an existing feature. Release note: None Co-authored-by: Rohan Yadav <[email protected]>
- Loading branch information
Showing
2 changed files
with
59 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
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,19 @@ | ||
#! /usr/bin/env expect -f | ||
|
||
source [file join [file dirname $argv0] common.tcl] | ||
|
||
start_test "Expect error with incorrect demo locality settings" | ||
|
||
# Test failure with less localities than expected. | ||
spawn $argv demo --nodes 3 --demo-locality=region=us-east1:region=us-east2 | ||
# wait for the CLI to start up | ||
eexpect "Error: number of localities specified must equal number of nodes" | ||
eexpect eof | ||
|
||
# Test failure with more localities than expected. | ||
spawn $argv demo --nodes 3 --demo-locality=region=us-east1:region=us-east2:region=us-east3:region=us-east4 | ||
# wait for the CLI to start up | ||
eexpect "Error: number of localities specified must equal number of nodes" | ||
eexpect eof | ||
|
||
end_test |