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
storage/etcd3: continue unifying test setup #109618
storage/etcd3: continue unifying test setup #109618
Conversation
Please note that we're already in Test Freeze for the |
f3507bf
to
d6c02ab
Compare
/sig api-machinery |
flake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple small comments - but overall this LGTM
@wojtek-t thanks for the review! Updated |
b5f8865
to
aec5853
Compare
/test pull-kubernetes-e2e-kind |
aec5853
to
9160626
Compare
@wojtek-t couldn't remove |
/test pull-kubernetes-node-e2e-containerd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great - I just have one nit comment.
/approve
Previous work by liggitt in 0176092 improved the boilerplate required to run an embedded etcd server for tests as well as set up the `*etcd3.store{}` for testing. A number of tests were not ported to use the new helpers, though, either due to custom setup or due to inconsistent use of setup options. A follow-up by stevekuznetsov in 6aa37eb removed much of the inconsistency, meaning that most callers to `newStore()` were simply using the default boilerplate and options that `testSetup()` used. This patch moves all users to testSetup(), adding options as necessary to enable some fringe setup use-cases. With a unified setup, new tests will not copy boilerplate they do not need and it will be immediately obvious when reading a test if the client or storage setup is *not* default, improving readability. Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
@wojtek-t updated to do a hard cast |
9160626
to
138faa3
Compare
/triage accepted |
/lgtm Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: stevekuznetsov, wojtek-t The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
storage/etcd3: continue unifying test setup
Previous work by liggitt in 0176092 improved the boilerplate
required to run an embedded etcd server for tests as well as set up the
*etcd3.store{}
for testing. A number of tests were not ported to use thenew helpers, though, either due to custom setup or due to inconsistent
use of setup options. A follow-up by stevekuznetsov in 6aa37eb
removed much of the inconsistency, meaning that most callers to
newStore()
were simply using the default boilerplate and options thattestSetup()
used.This patch moves all users to testSetup(), adding options as necessary
to enable some fringe setup use-cases. With a unified setup, new tests
will not copy boilerplate they do not need and it will be immediately
obvious when reading a test if the client or storage setup is not
default, improving readability.
Signed-off-by: Steve Kuznetsov skuznets@redhat.com
/kind cleanup
/assign @wojtek-t
/cc @liggitt