From 2b7e1c6f82990bb28fb2ed998c273b190f0f2b9f Mon Sep 17 00:00:00 2001 From: Tessa Pham Date: Wed, 8 Nov 2023 00:27:05 -0600 Subject: [PATCH] fix scripts Signed-off-by: Tessa Pham --- scripts/test.sh | 2 +- server/etcdserver/api/v3discovery/discovery_test.go | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index bab7b751a..bfb0229ab 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -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 diff --git a/server/etcdserver/api/v3discovery/discovery_test.go b/server/etcdserver/api/v3discovery/discovery_test.go index 79df73784..8bb71b359 100644 --- a/server/etcdserver/api/v3discovery/discovery_test.go +++ b/server/etcdserver/api/v3discovery/discovery_test.go @@ -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) {