-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
itest: add tests for macaroon authentication #1152
itest: add tests for macaroon authentication #1152
Conversation
dffd28d
to
c7e9fc1
Compare
15027b8
to
6899cf8
Compare
19bae76
to
4b3408a
Compare
65efe8c
to
264ccf2
Compare
5a54b72
to
355d9d9
Compare
a00ca06
to
0804aa0
Compare
8adc2f4
to
ec89753
Compare
ec89753
to
8c32631
Compare
8c32631
to
ccb2bb1
Compare
167e65b
to
709eb41
Compare
709eb41
to
c65a9b1
Compare
c65a9b1
to
2693d2b
Compare
2693d2b
to
cdeb04a
Compare
cdeb04a
to
92d73fb
Compare
139eb95
to
abebbcf
Compare
I tried some different setups and found that for this particular case, there is no overhead of adding a separate test case, because there are no new nodes spun up or channels opened. |
abebbcf
to
e90ee6d
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.
Solid set of tests!
lntest/itest/rpc.go
Outdated
t.Fatalf("unable to connect to alice: %v", err) | ||
} | ||
defer conn.Close() | ||
ctxt, cancel := context.WithTimeout(ctxb, defaultTimeout) |
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.
Nit: we usually ignore cancel
here. Any reason not to?
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.
Yeah, the linter complained... All other tests were probably added before the new linter?
e90ee6d
to
543b258
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.
Good test, LGTM 👍
t.Fatalf("unable to connect to alice: %v", err) | ||
} | ||
defer conn.Close() | ||
ctxt, cancel := context.WithTimeout(ctxb, defaultTimeout) |
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.
nit: newline above for some breathing room
This PR adds a new integration test for the macaroon authentication of the gRPC interface, as mentioned in #284.
The following six scenarios are tested:
write
with a read-only macaroon.TimeoutConstraint
is not satisfied.IPLockConstraint
is not satisfied.Closes #284.