Added in server builder.
This commit is contained in:
parent
db6f5081dc
commit
d869bed623
|
|
@ -19,6 +19,7 @@
|
|||
#include <grpcpp/security/credentials.h>
|
||||
#include <grpcpp/security/server_credentials.h>
|
||||
#include <grpcpp/security/tls_credentials_options.h>
|
||||
#include <grpcpp/server_builder.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
@ -690,6 +691,10 @@ TEST_F(CredentialsTest, LoadTlsServerCredentials) {
|
|||
TlsCredentialsOptions options = TlsCredentialsOptions(
|
||||
GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY,
|
||||
GRPC_TLS_SERVER_VERIFICATION, nullptr, credential_reload_config, nullptr);
|
||||
// It is necessary to instantiate a |ServerBuilder| object so that the C-core
|
||||
// is properly initialized.
|
||||
::grpc::ServerBuilder builder;
|
||||
(void)builder;
|
||||
std::shared_ptr<::grpc_impl::ServerCredentials> server_credentials =
|
||||
grpc::experimental::TlsServerCredentials(options);
|
||||
GPR_ASSERT(server_credentials.get() != nullptr);
|
||||
|
|
@ -762,8 +767,6 @@ TEST_F(CredentialsTest, TlsServerAuthorizationCheckConfigErrorMessages) {
|
|||
|
||||
int main(int argc, char** argv) {
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
grpc_init();
|
||||
int ret = RUN_ALL_TESTS();
|
||||
grpc_shutdown();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
# Copyright 2019 The gRPC Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Config file for the internal CI (in protobuf text format)
|
||||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc/tools/internal_ci/macos/grpc_run_bazel_cpp_ios_tests.sh"
|
||||
Loading…
Reference in New Issue