-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
test/kubernetes_unittest.cc
Outdated
| })->As<json::Object>(), | ||
| json::string("TestAssociations"), | ||
| Timestamp(), | ||
| false); |
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's make this /*is_deleted=*/false.
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.
Added.
test/kubernetes_unittest.cc
Outdated
| })->As<json::Object>(), | ||
| json::object({{"name", json::string("TestSpecName")}})->As<json::Object>(), | ||
| json::object({ | ||
| {"containerID", json::string("docker://TestContainerID")} |
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.
Trailing comma, please.
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.
Added
test/kubernetes_unittest.cc
Outdated
| {"uid", json::string("TestUid")}, | ||
| {"creationTimestamp", json::string("2018-03-03T01:23:45.678901234Z")}, | ||
| {"labels", json::object({{"label", json::string("TestLabel")}})}, | ||
| })} |
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.
Trailing comma, please.
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.
Added
test/kubernetes_unittest.cc
Outdated
| {"raw", json::object({ | ||
| {"containerID", json::string("docker://TestContainerID")}, | ||
| })}, | ||
| {"version", json::string("1.6")} |
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.
Trailing comma, please.
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.
Added
test/kubernetes_unittest.cc
Outdated
| EXPECT_EQ(std::vector<std::string>({ | ||
| "k8s_container.TestUid.TestSpecName", | ||
| "k8s_container.TestNamespace.TestName.TestSpecName", | ||
| "k8s_container.TestContainerID"}), m.ids()); |
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's break before the } and add a trailing comma.
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.
Much better, updated.
igorpeshansky
left a comment
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.
One more.
test/kubernetes_unittest.cc
Outdated
| KubernetesReader reader(config, nullptr); // Don't need HealthChecker. | ||
| const auto m = GetContainerMetadata( | ||
| reader, | ||
| json::object({ |
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.
I would factor this call out to a pod local variable...
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.
Updated
test/kubernetes_unittest.cc
Outdated
| const auto m = GetContainerMetadata( | ||
| reader, | ||
| pod->As<json::Object>(), | ||
| json::object({{"name", json::string("TestSpecName")}})->As<json::Object>(), |
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.
These too, as spec and status?
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.
Fixed
test/kubernetes_unittest.cc
Outdated
| }); | ||
| json::value spec = json::object({{"name", json::string("TestSpecName")}}); | ||
| json::value status = json::object({{ | ||
| "containerID", json::string("docker://TestContainerID")}}); |
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.
When split over multiple lines, let's use the following formatting:
json::value status = json::object({
{"containerID", json::string("docker://TestContainerID")},
});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.
Fixed
test/kubernetes_unittest.cc
Outdated
| }); | ||
| json::value spec = json::object({{"name", json::string("TestSpecName")}}); | ||
| json::value status = json::object({ | ||
| {"containerID", json::string("docker://TestContainerID")} |
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.
Trailing comma, please.
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.
Fixed
igorpeshansky
left a comment
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.
LGTM ![]()
b71d992 to
590cd89
Compare
|
Rebased against master |
590cd89 to
418ec6f
Compare
supriyagarg
left a comment
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.
LGTM
No description provided.