github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/cli/interactive_tests/test_demo_locality_error.tcl (about) 1 #! /usr/bin/env expect -f 2 3 source [file join [file dirname $argv0] common.tcl] 4 5 start_test "Expect error with incorrect demo locality settings" 6 7 # Test failure with less localities than expected. 8 spawn $argv demo --nodes 3 --demo-locality=region=us-east1:region=us-east2 9 # wait for the CLI to start up 10 eexpect "ERROR: number of localities specified must equal number of nodes" 11 eexpect eof 12 13 # Test failure with more localities than expected. 14 spawn $argv demo --nodes 3 --demo-locality=region=us-east1:region=us-east2:region=us-east3:region=us-east4 15 # wait for the CLI to start up 16 eexpect "ERROR: number of localities specified must equal number of nodes" 17 eexpect eof 18 19 end_test