fix scripts

Signed-off-by: Tessa Pham <hpham111@bloomberg.net>
This commit is contained in:
Tessa Pham 2023-11-08 00:27:05 -06:00
parent 649b365937
commit 2b7e1c6f82
2 changed files with 5 additions and 6 deletions

View File

@ -652,7 +652,7 @@ function run_pass {
local pass="${1}"
shift 1
log_callout -e "\\n'${pass}' started at $(date)"
if "${pass}_pass" "${@}" ; then
if "${pass}_pass" "$@" ; then
log_success "'${pass}' PASSED and completed at $(date)"
return 0
else

View File

@ -248,8 +248,8 @@ func (fkv *fakeKVForCheckCluster) Get(ctx context.Context, key string, opts ...c
},
},
}, nil
} else if key == clusterMembersKey {
}
if key == clusterMembersKey {
if fkv.getMembersRetries > 0 {
fkv.getMembersRetries--
// discovery client should retry on error.
@ -263,10 +263,9 @@ func (fkv *fakeKVForCheckCluster) Get(ctx context.Context, key string, opts ...c
},
Kvs: kvs,
}, nil
} else {
fkv.t.Errorf("unexpected key: %s", key)
return nil, fmt.Errorf("unexpected key: %s", key)
}
fkv.t.Errorf("unexpected key: %s", key)
return nil, fmt.Errorf("unexpected key: %s", key)
}
func TestCheckCluster(t *testing.T) {