-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
base_overload_integration_test.cc
34 lines (27 loc) · 1.13 KB
/
base_overload_integration_test.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "test/integration/base_overload_integration_test.h"
#include "test/test_common/utility.h"
namespace Envoy {
namespace {
envoy::config::overload::v3::OverloadManager getBaseOverloadManagerConfig() {
return TestUtility::parseYaml<envoy::config::overload::v3::OverloadManager>(R"EOF(
refresh_interval:
seconds: 0
nanos: 1000000
resource_monitors:
- name: "envoy.resource_monitors.testonly.fake_resource_monitor"
typed_config:
"@type": type.googleapis.com/test.common.config.DummyConfig
)EOF");
}
} // namespace
void BaseOverloadIntegrationTest::setupOverloadManagerConfig(
const envoy::config::overload::v3::OverloadAction& overload_action) {
overload_manager_config_ = getBaseOverloadManagerConfig();
*overload_manager_config_.add_actions() = overload_action;
}
void BaseOverloadIntegrationTest::setupOverloadManagerConfig(
const envoy::config::overload::v3::LoadShedPoint& load_shed_point) {
overload_manager_config_ = getBaseOverloadManagerConfig();
*overload_manager_config_.add_loadshed_points() = load_shed_point;
}
} // namespace Envoy