Add test support infrastructure for identity#227
Merged
Conversation
Signed-off-by: Eliza Weisman <[email protected]>
turns out it's set by default x_x
hawkw
commented
Mar 28, 2019
| ) | ||
| -> Box<Future<Item = grpc::Response<pb::CertifyResponse>, Error = grpc::Status> + Send> | ||
| + Send, | ||
| >; |
Contributor
Author
There was a problem hiding this comment.
I want to note here that I did not choose this formatting, this is what rustfmt thought would look good.
kleimkuhler
reviewed
Mar 29, 2019
olix0r
reviewed
Mar 29, 2019
olix0r
reviewed
Mar 29, 2019
| /// An implementation of `Strings` that reads the values from environment variables. | ||
| pub struct Env; | ||
|
|
||
| #[derive(Clone)] |
Member
There was a problem hiding this comment.
just curious.... can this be #[cfg(test)]?
Contributor
There was a problem hiding this comment.
I don't think so, since the tests are compiled as the binary in test mode with the proxy as just a regular dependency.
olix0r
approved these changes
Mar 29, 2019
Member
olix0r
left a comment
There was a problem hiding this comment.
looks great. would love a review from @seanmonstar, too, since he's most familiar with test infra
thanks @kleimkuhler for noticing :)
Signed-off-by: Eliza Weisman <[email protected]>
seanmonstar
approved these changes
Apr 2, 2019
hawkw
added a commit
that referenced
this pull request
Apr 2, 2019
Depends on #227 This branch adds a proxy integration test for the `/ready` endpoint. The test asserts that when a proxy has not yet had its identity certified by the Identity service, it does not consider itself "ready", and that a it becomes ready after its identity is certified. See also linkerd/linkerd2#2505 Signed-off-by: Eliza Weisman <[email protected]>
hawkw
added a commit
that referenced
this pull request
Apr 2, 2019
Depends on #227 and #228. This branch adds a new integration test that asserts that a proxy will refresh its identity before the specified expiration time. I also added a `trace` log in the `identity` module that logs the actual duration we will wait before attempting to refresh. This was useful when debugging why this test was failing (it was because I neglected to set the LINKERD2_PROXY_IDENTITY_MIN_REFRESH env var, and it defaulted to 10 seconds). I felt like it was useful to log the actual duration we will wait as well as the `SystemTime` when the cert expires, but I'm happy to back that commit off if we don't actually want that log line. Closes linkerd/linkerd2#2505 Signed-off-by: Eliza Weisman <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This branch adds a mock Identity service implementation to the proxy's
test-support module, and wires up the rest of the test support code to
allow mocking the Identity service in tests. The existing tests for the
l5d-server-idheader have been updated to work with the identityservice.
Note that this branch does not add any new tests for the proxy's
behaviour with the Identity service. I was planning to add these in a
follow-up PR.
See also linkerd/linkerd2#2505
Signed-off-by: Eliza Weisma [email protected]