aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/common/secure_auth_context_test.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-12-26 15:10:41 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2018-12-26 15:10:41 -0800
commit24e37e249a4db24ff2c886960e3a00311e2591dd (patch)
tree7bcb4a002432e7ef04054750b1efe8dfd9ba8ade /test/cpp/common/secure_auth_context_test.cc
parent0911e489e3fe22e2ca5d7c927dac83358f2f05b7 (diff)
parentfc7d0911a3a44d7bc926d3db99b7300a0c0f33dc (diff)
Merge branch 'master' into failhijackedrecv
Diffstat (limited to 'test/cpp/common/secure_auth_context_test.cc')
-rw-r--r--test/cpp/common/secure_auth_context_test.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/cpp/common/secure_auth_context_test.cc b/test/cpp/common/secure_auth_context_test.cc
index 6461f49743..03b3a9fdd8 100644
--- a/test/cpp/common/secure_auth_context_test.cc
+++ b/test/cpp/common/secure_auth_context_test.cc
@@ -33,7 +33,7 @@ class SecureAuthContextTest : public ::testing::Test {};
// Created with nullptr
TEST_F(SecureAuthContextTest, EmptyContext) {
- SecureAuthContext context(nullptr, true);
+ SecureAuthContext context(nullptr);
EXPECT_TRUE(context.GetPeerIdentity().empty());
EXPECT_TRUE(context.GetPeerIdentityPropertyName().empty());
EXPECT_TRUE(context.FindPropertyValues("").empty());
@@ -42,8 +42,10 @@ TEST_F(SecureAuthContextTest, EmptyContext) {
}
TEST_F(SecureAuthContextTest, Properties) {
- grpc_auth_context* ctx = grpc_auth_context_create(nullptr);
- SecureAuthContext context(ctx, true);
+ grpc_core::RefCountedPtr<grpc_auth_context> ctx =
+ grpc_core::MakeRefCounted<grpc_auth_context>(nullptr);
+ SecureAuthContext context(ctx.get());
+ ctx.reset();
context.AddProperty("name", "chapi");
context.AddProperty("name", "chapo");
context.AddProperty("foo", "bar");
@@ -60,8 +62,10 @@ TEST_F(SecureAuthContextTest, Properties) {
}
TEST_F(SecureAuthContextTest, Iterators) {
- grpc_auth_context* ctx = grpc_auth_context_create(nullptr);
- SecureAuthContext context(ctx, true);
+ grpc_core::RefCountedPtr<grpc_auth_context> ctx =
+ grpc_core::MakeRefCounted<grpc_auth_context>(nullptr);
+ SecureAuthContext context(ctx.get());
+ ctx.reset();
context.AddProperty("name", "chapi");
context.AddProperty("name", "chapo");
context.AddProperty("foo", "bar");