Skip to content
This repository was archived by the owner on Aug 19, 2019. It is now read-only.

Conversation

@ACEmilG
Copy link
Contributor

@ACEmilG ACEmilG commented Apr 2, 2018

No description provided.

{"pod_id", "TestUid"},
{"zone", "TestZone"},
}), m.resource());
EXPECT_EQ("", m.metadata().version);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this to:
EXPECT_TRUE(m.metadata().version.empty());

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

})}
});
const auto m = GetLegacyResource(reader, json::object({
{"metadata", json::object({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this just pod->As<json::Object>()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed pod, it was supposed to be inlined.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was actually suggesting you keep pod...

EXPECT_FALSE(m.metadata().is_deleted);
EXPECT_EQ(Timestamp(), m.metadata().created_at);
EXPECT_EQ(Timestamp(), m.metadata().collected_at);
EXPECT_TRUE(m.metadata().ignore);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave this one, remove all of the other checks of m.metadata() — they're implementation details.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

EXPECT_EQ(Timestamp(), m.metadata().created_at);
EXPECT_EQ(Timestamp(), m.metadata().collected_at);
EXPECT_TRUE(m.metadata().ignore);
EXPECT_EQ(json::object({})->ToString(), m.metadata().metadata->ToString());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Irrelevant now, but json::object()->ToString() is just "{}".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, but removed as you pointed out.

})->As<json::Object>(), "TestContainerName");
EXPECT_EQ(std::vector<std::string>({
"gke_container.TestNamespace.TestUid.TestContainerName",
"gke_container.TestNamespace.TestName.TestContainerName"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing comma, please.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

})}
});
const auto m = GetLegacyResource(reader, json::object({
{"metadata", json::object({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was actually suggesting you keep pod...

Copy link
Contributor

@igorpeshansky igorpeshansky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@ACEmilG ACEmilG force-pushed the ACEmilG-GetLegacyResource-test branch from ea02f0f to 9fd6819 Compare April 2, 2018 22:17
@ACEmilG
Copy link
Contributor Author

ACEmilG commented Apr 2, 2018

Rebased against master

Copy link
Contributor

@igorpeshansky igorpeshansky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@igorpeshansky igorpeshansky merged commit 6322a98 into master Apr 3, 2018
@igorpeshansky igorpeshansky deleted the ACEmilG-GetLegacyResource-test branch April 3, 2018 03:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants