Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
Signed-off-by: Alyssa Wilk <[email protected]>
  • Loading branch information
alyssawilk committed Jul 3, 2024
1 parent 5080559 commit c7e9d9c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
31 changes: 15 additions & 16 deletions test/integration/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
namespace Envoy {
namespace Server {

OptionsImpl createTestOptionsImpl(const std::string& config_path, const std::string& config_yaml,
Network::Address::IpVersion ip_version,
FieldValidationConfig validation_config, uint32_t concurrency,
std::chrono::seconds drain_time,
Server::DrainStrategy drain_strategy,
bool use_bootstrap_node_metadata,
std::unique_ptr<envoy::config::bootstrap::v3::Bootstrap>&& config_proto) {
OptionsImpl
createTestOptionsImpl(const std::string& config_path, const std::string& config_yaml,
Network::Address::IpVersion ip_version,
FieldValidationConfig validation_config, uint32_t concurrency,
std::chrono::seconds drain_time, Server::DrainStrategy drain_strategy,
bool use_bootstrap_node_metadata,
std::unique_ptr<envoy::config::bootstrap::v3::Bootstrap>&& config_proto) {
// Empty string values mean the Bootstrap node metadata won't be overridden.
const std::string service_cluster = use_bootstrap_node_metadata ? "" : "cluster_name";
const std::string service_node = use_bootstrap_node_metadata ? "" : "node_name";
Expand Down Expand Up @@ -71,8 +71,8 @@ IntegrationTestServerPtr IntegrationTestServer::create(
Buffer::WatermarkFactorySharedPtr watermark_factory, bool use_real_stats,
bool use_bootstrap_node_metadata,
std::unique_ptr<envoy::config::bootstrap::v3::Bootstrap>&& config_proto) {
IntegrationTestServerPtr server{
std::make_unique<IntegrationTestServerImpl>(time_system, api, config_path, use_real_stats, std::move(config_proto))};
IntegrationTestServerPtr server{std::make_unique<IntegrationTestServerImpl>(
time_system, api, config_path, use_real_stats, std::move(config_proto))};
if (server_ready_function != nullptr) {
server->setOnServerReadyCb(server_ready_function);
}
Expand Down Expand Up @@ -196,9 +196,9 @@ void IntegrationTestServer::threadRoutine(
ProcessObjectOptRef process_object, Server::FieldValidationConfig validation_config,
uint32_t concurrency, std::chrono::seconds drain_time, Server::DrainStrategy drain_strategy,
Buffer::WatermarkFactorySharedPtr watermark_factory, bool use_bootstrap_node_metadata) {
OptionsImpl options(Server::createTestOptionsImpl(config_path_, "", version, validation_config,
concurrency, drain_time, drain_strategy,
use_bootstrap_node_metadata, std::move(config_proto_)));
OptionsImpl options(Server::createTestOptionsImpl(
config_path_, "", version, validation_config, concurrency, drain_time, drain_strategy,
use_bootstrap_node_metadata, std::move(config_proto_)));
Thread::MutexBasicLockable lock;

Random::RandomGeneratorPtr random_generator;
Expand All @@ -214,10 +214,9 @@ void IntegrationTestServer::threadRoutine(
watermark_factory);
}

IntegrationTestServerImpl::IntegrationTestServerImpl(Event::TestTimeSystem& time_system,
Api::Api& api, const std::string& config_path,
bool use_real_stats,
std::unique_ptr<envoy::config::bootstrap::v3::Bootstrap>&& config_proto)
IntegrationTestServerImpl::IntegrationTestServerImpl(
Event::TestTimeSystem& time_system, Api::Api& api, const std::string& config_path,
bool use_real_stats, std::unique_ptr<envoy::config::bootstrap::v3::Bootstrap>&& config_proto)
: IntegrationTestServer(time_system, api, config_path, std::move(config_proto)) {
stats_allocator_ =
(use_real_stats ? std::make_unique<Stats::AllocatorImpl>(symbol_table_)
Expand Down
10 changes: 6 additions & 4 deletions test/integration/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,8 @@ class IntegrationTestServer : public Logger::Loggable<Logger::Id::testing>,
IntegrationTestServer(Event::TestTimeSystem& time_system, Api::Api& api,
const std::string& config_path,
std::unique_ptr<envoy::config::bootstrap::v3::Bootstrap>&& config_proto)
: time_system_(time_system), api_(api), config_path_(config_path), config_proto_(std::move(config_proto)) {}
: time_system_(time_system), api_(api), config_path_(config_path),
config_proto_(std::move(config_proto)) {}

// Create the running envoy server. This function will call serverReady() when the virtual
// functions server(), statStore(), and adminAddress() may be called, but before the server
Expand Down Expand Up @@ -604,9 +605,10 @@ class IntegrationTestServer : public Logger::Loggable<Logger::Id::testing>,
// Default implementation of IntegrationTestServer
class IntegrationTestServerImpl : public IntegrationTestServer {
public:
IntegrationTestServerImpl(Event::TestTimeSystem& time_system, Api::Api& api,
const std::string& config_path, bool real_stats = false,
std::unique_ptr<envoy::config::bootstrap::v3::Bootstrap>&& config_proto = nullptr);
IntegrationTestServerImpl(
Event::TestTimeSystem& time_system, Api::Api& api, const std::string& config_path,
bool real_stats = false,
std::unique_ptr<envoy::config::bootstrap::v3::Bootstrap>&& config_proto = nullptr);

~IntegrationTestServerImpl() override;

Expand Down

0 comments on commit c7e9d9c

Please sign in to comment.