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

etcdserver: Fix v2v3api set to create parent directly if not exists #9626

Merged
merged 1 commit into from
Apr 26, 2018

Conversation

yudai
Copy link
Contributor

@yudai yudai commented Apr 25, 2018

When a new file is created under an non existent directly,
the v2 API automatically create the parent directly.
This commit aligns the behaviour of v2v3 emulation to comply with the v2
API.

Fixes #9609

@ericchiang
Copy link
Contributor

Include a test?

@yudai
Copy link
Contributor Author

yudai commented Apr 25, 2018

I think we should run the integration tests for the v2 api against the v2v3 emulated endpoint. I'll try to do so.
Le me know if you want unit tests for the v2v3 emulation layer.

@gyuho
Copy link
Contributor

gyuho commented Apr 25, 2018

@yudai Just simple unit test in v2store package would be great. https://github.com/coreos/etcd/blob/master/etcdserver/v2store/store_v2v3_test.go

Thanks!

When a new file is created under an non existent directly,
the v2 API automatically create the parent directly.
This commit aligns the behaviour of v2v3 emulation to comply with the v2
API.
@yudai
Copy link
Contributor Author

yudai commented Apr 26, 2018

@gyuho Thanks for the pointer. I added a unit test.

@yudai
Copy link
Contributor Author

yudai commented Apr 26, 2018

Created a separate PR for integration test enhancement, because it can take some time to complete.

Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

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

lgtm thanks @yudai !

@gyuho gyuho merged commit dca3f5e into etcd-io:master Apr 26, 2018
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.

3 participants