Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add an example test for GetPrefixRangeEnd #8175

Closed
wants to merge 1 commit into from

Conversation

harryge00
Copy link
Contributor

Contributing guidelines

Please read our contribution workflow before submitting a pull request.

GetPrefixRangeEnd has not been tested in clientv3. Add it in ExampleKV_getSortedPrefix()

@harryge00 harryge00 force-pushed the clientv3_test branch 3 times, most recently from 9b21032 to 9ae7fe2 Compare June 25, 2017 05:51
@heyitsanthony
Copy link
Contributor

It's already covered/tested: https://codecov.io/gh/coreos/etcd/src/9e574afb84ca88b68ca2c56542cf872ce34a1b2f/clientv3/op.go#L305

If there's going to be an example it shouldn't hang off the sort example since it doesn't really demonstrate the purpose of the function.

@harryge00
Copy link
Contributor Author

@heyitsanthony I have just moved the block to another function. ExampleKV_getAscendingSortedPrefix

In ExampleKV_getSortedPrefix, clientv3.WithPrefix() is tested. So I wrote another function to test clientv3.WithRange(clientv3.GetPrefixRangeEnd("key"))... I think they are different.

@harryge00
Copy link
Contributor Author

I have just began reading the code of etcd and want to contribute. I was wondering if there would be any minor feature I can do...

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@86eced6). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #8175   +/-   ##
=========================================
  Coverage          ?   76.46%           
=========================================
  Files             ?      344           
  Lines             ?    26886           
  Branches          ?        0           
=========================================
  Hits              ?    20558           
  Misses            ?     4854           
  Partials          ?     1474

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 86eced6...54807bf. Read the comment docs.

@xiang90
Copy link
Contributor

xiang90 commented Jun 27, 2017

@harryge00 probably take a look at #8060?

@xiang90
Copy link
Contributor

xiang90 commented Jun 28, 2017

closing this pr since the same thing already exists.

@xiang90 xiang90 closed this Jun 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants