ssl: temporariliy fix utility test#4701
Merged
alyssawilk merged 2 commits intoenvoyproxy:masterfrom Oct 12, 2018
Merged
Conversation
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
ramaraochavali
approved these changes
Oct 12, 2018
| TEST(UtilityTest, TestDaysUntilExpiration) { | ||
| bssl::UniquePtr<X509> cert = readCertFromFile("test/common/ssl/test_data/san_dns_cert.pem"); | ||
| EXPECT_EQ(270, Utility::getDaysUntilExpiration(cert.get())); | ||
| EXPECT_GE(0, Utility::getDaysUntilExpiration(cert.get())); |
Contributor
There was a problem hiding this comment.
I think it should be reverse?
ramaraochavali
suggested changes
Oct 12, 2018
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
ramaraochavali
approved these changes
Oct 12, 2018
jmarantz
reviewed
Oct 12, 2018
| TEST(UtilityTest, TestDaysUntilExpiration) { | ||
| bssl::UniquePtr<X509> cert = readCertFromFile("test/common/ssl/test_data/san_dns_cert.pem"); | ||
| EXPECT_EQ(270, Utility::getDaysUntilExpiration(cert.get())); | ||
| EXPECT_LE(0, Utility::getDaysUntilExpiration(cert.get())); |
Contributor
There was a problem hiding this comment.
Can we inject TimeSource into getDaysUntilExpiration?
Member
There was a problem hiding this comment.
Yeah, +1, if we can do this quickly and unblock CI, this is the right thing to do. If we need something to just unblock CI, lets do the current PR with the TODO.
Member
Author
There was a problem hiding this comment.
Yes I left it as a TODO, didn't want to introduce more to unblock CI quickly.
Contributor
alyssawilk
approved these changes
Oct 12, 2018
Contributor
alyssawilk
left a comment
There was a problem hiding this comment.
Synced with htuch offline - I'm just going to go ahead and merge this to unbreak CI.
We can do the long term fix later.
Contributor
|
Also thank you for the quick fix, @lizan!! |
This was referenced Oct 12, 2018
Merged
htuch
pushed a commit
that referenced
this pull request
Oct 23, 2018
Plumbs time source to context manager as discussed in #4701. This is to allow control time on Utility::getDaysUntilExpiration method. Risk Level: Low Testing: Existing automated tests Docs Changes: N/A Release Notes: N/A Signed-off-by: Rama <rama.rao@salesforce.com>
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.
Signed-off-by: Lizan Zhou lizan@tetrate.io
Description:
Quick fix of time dependent SSL utility test introduced in #4686.
Risk Level: Low
Testing: CI
Docs Changes: N/A
Release Notes: N/A