-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
e2e: add gRPC gateway Lease tests #9460
Conversation
2c50ae3
to
f400153
Compare
@gyuho PTAL re approach, thanks. |
2611b93
to
46979c0
Compare
46979c0
to
b19bd8e
Compare
semaphore failure seems unrelated
If someone could restart test, thanks. |
hmm, maybe timeout is from the additional tests? Do we need to extend? |
value: gwKVPutLease(cx, "foo", "bar", leaseID), | ||
expected: `"revision":"`, | ||
}, | ||
{ |
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.
duplicate timetolive
call
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.
gwLeaseTTLWithKeys covers bases, thanks.
e2e/v3_curl_lease_test.go
Outdated
return s | ||
} | ||
|
||
func gwLeaseNoID(cx ctlCtx, ttl int64) string { |
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.
Just combine as func gwLeaseGrant(cx ctlCtx, leaseID int64, ttl int64) string
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.
makes sense
pb "github.com/coreos/etcd/etcdserver/etcdserverpb" | ||
) | ||
|
||
func TestV3CurlLeaseGrantNoTLS(t *testing.T) { |
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.
We already have a ton of TLS coverage, and now tests are taking too long.
Just keep the one with no TLS?
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.
OK sounds good I misunderstood that you wanted to have all of these.
e2e/v3_curl_lease_test.go
Outdated
value: gwLeaseWithID(cx, leaseID), | ||
expected: gwLeaseIDExpected(leaseID), | ||
}, | ||
{ |
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.
remove put and range.
e2e only needs to test lease API output
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.
understood, thanks.
e2e/v3_curl_lease_test.go
Outdated
} | ||
} | ||
|
||
func testV3CurlLeaseTTL(cx ctlCtx) { |
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.
remove timetolive
and move them to testV3CurlLeaseGrant
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.
Thank you for comments @gyuho, rebasing shortly.
pb "github.com/coreos/etcd/etcdserver/etcdserverpb" | ||
) | ||
|
||
func TestV3CurlLeaseGrantNoTLS(t *testing.T) { |
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.
OK sounds good I misunderstood that you wanted to have all of these.
e2e/v3_curl_lease_test.go
Outdated
return s | ||
} | ||
|
||
func gwLeaseNoID(cx ctlCtx, ttl int64) string { |
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.
makes sense
value: gwKVPutLease(cx, "foo", "bar", leaseID), | ||
expected: `"revision":"`, | ||
}, | ||
{ |
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.
gwLeaseTTLWithKeys covers bases, thanks.
e2e/v3_curl_lease_test.go
Outdated
value: gwLeaseWithID(cx, leaseID), | ||
expected: gwLeaseIDExpected(leaseID), | ||
}, | ||
{ |
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.
understood, thanks.
b19bd8e
to
eeaaec5
Compare
Codecov Report
@@ Coverage Diff @@
## master #9460 +/- ##
==========================================
- Coverage 72.96% 72.65% -0.31%
==========================================
Files 364 364
Lines 30883 30890 +7
==========================================
- Hits 22533 22443 -90
- Misses 6749 6829 +80
- Partials 1601 1618 +17
Continue to review full report at Codecov.
|
@gyuho knits should be all addressed, PTAL. |
e2e/v3_curl_lease_test.go
Outdated
|
||
type v3cURLTest struct { | ||
endpoint string | ||
value interface{} |
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.
value
should string
type?
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.
@gyuho yeah, because of the changing data types I am passing for example pb.LeaseTimeToLiveRequest then pb.LeaseKeepAliveRequest etc I found interface{} useful this generic typing. But perhaps that data flexibility is an issue in itself?
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.
Let me revist this.
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.
@gyuho you were right I simplified this so that it can handle a string. This is now resolved, thanks!
eeaaec5
to
8dab18a
Compare
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.
thanks!
@gyuho looks like semaphore did not get included here in checks, is that expected? |
@hexfusion Should be safe to merge. Previous run passed. |
With a focus on Lease this is my initial stab at refactoring e2e grpc gateway tests. Next phase will be breaking out existing curl tests into separate files and providing full TLS coverage in prep for stable v3/.
ref: #9189, #9450