forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintegration_test.h
32 lines (28 loc) · 1.01 KB
/
integration_test.h
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
#pragma once
#include "test/integration/integration.h"
#include "gtest/gtest.h"
namespace Envoy {
class IntegrationTest : public BaseIntegrationTest,
public testing::TestWithParam<Network::Address::IpVersion> {
public:
IntegrationTest() : BaseIntegrationTest(GetParam()) {}
/**
* Initializer for an individual test.
*/
void SetUp() override {
fake_upstreams_.emplace_back(new FakeUpstream(0, FakeHttpConnection::Type::HTTP1, version_));
registerPort("upstream_0", fake_upstreams_.back()->localAddress()->ip()->port());
fake_upstreams_.emplace_back(new FakeUpstream(0, FakeHttpConnection::Type::HTTP1, version_));
registerPort("upstream_1", fake_upstreams_.back()->localAddress()->ip()->port());
createTestServer("test/config/integration/server.json",
{"http", "http_buffer", "tcp_proxy", "rds"});
}
/**
* Destructor for an individual test.
*/
void TearDown() override {
test_server_.reset();
fake_upstreams_.clear();
}
};
} // Envoy