Skip to content

Commit

Permalink
Merge pull request etcd-io#16889 from tessapham/fix-scripts
Browse files Browse the repository at this point in the history
fix test script and lint
  • Loading branch information
serathius committed Nov 9, 2023
2 parents 38cc9f2 + 2b7e1c6 commit 6e30d9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions server/etcdserver/api/v3discovery/discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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) {
Expand Down

0 comments on commit 6e30d9e

Please sign in to comment.