Make ChannelCredsRegistryTest order independent (#29644)

pull/29674/head
Yousuk Seung 3 years ago committed by GitHub
parent 063c36cb46
commit d1338d8751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      test/core/security/channel_creds_registry_test.cc

@ -43,7 +43,15 @@ class TestChannelCredsFactory : public ChannelCredsFactory<> {
}
};
TEST(ChannelCredsRegistry2Test, DefaultCreds) {
class ChannelCredsRegistryTest : public ::testing::Test {
protected:
void SetUp() override {
CoreConfiguration::Reset();
grpc_init();
}
};
TEST_F(ChannelCredsRegistryTest, DefaultCreds) {
// Default creds.
EXPECT_TRUE(CoreConfiguration::Get().channel_creds_registry().IsSupported(
"google_default"));
@ -63,10 +71,7 @@ TEST(ChannelCredsRegistry2Test, DefaultCreds) {
nullptr);
}
TEST(ChannelCredsRegistry2Test, Register) {
CoreConfiguration::Reset();
grpc_init();
TEST_F(ChannelCredsRegistryTest, Register) {
// Before registration.
EXPECT_FALSE(
CoreConfiguration::Get().channel_creds_registry().IsSupported("test"));

Loading…
Cancel
Save