Skip to content

Add unit tests for etcd Client#344

Merged
peterbourgon merged 2 commits intogo-kit:masterfrom
jstordeur:master
Aug 23, 2016
Merged

Add unit tests for etcd Client#344
peterbourgon merged 2 commits intogo-kit:masterfrom
jstordeur:master

Conversation

@jstordeur
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread sd/etcd/client_test.go
keysAPI: &fakeKeysAPI{event, err, getres},
ctx: context.Background(),
}, nil
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason to have the return signature include an error that's always nil, unless I'm missing something?

func newFakeClient(...) Client {
   return &client{...}
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, I'll change that

@peterbourgon
Copy link
Copy Markdown
Member

Other than that one nit, looks good! For the record: this increases coverage of package etcd from 35.1% to 68.9%. Here is the coverage report. Would you be up to adding some tests to registrar, too? ;)

@jstordeur
Copy link
Copy Markdown
Contributor Author

I'll have a look at registrar

@peterbourgon
Copy link
Copy Markdown
Member

78.4% 😎

@peterbourgon peterbourgon merged commit b6d7651 into go-kit:master Aug 23, 2016
@peterbourgon
Copy link
Copy Markdown
Member

Amazing! Thank you so much.

jamesgist pushed a commit to jamesgist/kit that referenced this pull request Nov 1, 2024
Add unit tests for etcd Client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants