1 // 2 // 3 // Copyright 2018 gRPC authors. 4 // 5 // Licensed under the Apache License, Version 2.0 (the "License"); 6 // you may not use this file except in compliance with the License. 7 // You may obtain a copy of the License at 8 // 9 // http://www.apache.org/licenses/LICENSE-2.0 10 // 11 // Unless required by applicable law or agreed to in writing, software 12 // distributed under the License is distributed on an "AS IS" BASIS, 13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 // See the License for the specific language governing permissions and 15 // limitations under the License. 16 // 17 // 18 19 #ifndef GRPC_TEST_CORE_END2END_FIXTURES_LOCAL_UTIL_H 20 #define GRPC_TEST_CORE_END2END_FIXTURES_LOCAL_UTIL_H 21 22 #include <string> 23 24 #include "absl/functional/any_invocable.h" 25 26 #include <grpc/grpc.h> 27 #include <grpc/grpc_security_constants.h> 28 29 #include "src/core/lib/channel/channel_args.h" 30 #include "test/core/end2end/end2end_tests.h" 31 32 class LocalTestFixture final : public grpc_core::CoreTestFixture { 33 public: 34 LocalTestFixture(std::string localaddr, grpc_local_connect_type type); 35 36 private: 37 grpc_server* MakeServer( 38 const grpc_core::ChannelArgs& args, grpc_completion_queue* cq, 39 absl::AnyInvocable<void(grpc_server*)>& pre_server_start) override; 40 grpc_channel* MakeClient(const grpc_core::ChannelArgs& args, 41 grpc_completion_queue* cq) override; 42 43 std::string localaddr_; 44 grpc_local_connect_type type_; 45 }; 46 47 #endif // GRPC_TEST_CORE_END2END_FIXTURES_LOCAL_UTIL_H 48