Skip to content

Commit b6f1dbb

Browse files
committed
add proxy server as docker service
this makes the tests rely on a dockerized proxy service instead of a random server on the internet fixes #71, closes #72
1 parent f57092f commit b6f1dbb

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,21 @@ language: cpp
22
dist: trusty
33
sudo: required
44
group: beta
5+
6+
services:
7+
- docker
8+
59
compiler:
610
- gcc
711
- clang
812
script:
913
- ./autogen.sh && ./configure --enable-coverage
1014
- make ci
15+
16+
before_install:
17+
- docker pull chrisdaish/squid
18+
- docker run -d -p 3128:3128 chrisdaish/squid
19+
- docker ps -a
1120
install:
1221
- gem install fpm
1322
- gem install package_cloud

test/test_connection.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,14 @@ TEST_F(ConnectionTest, TestNoSignal)
219219

220220
TEST_F(ConnectionTest, TestProxy)
221221
{
222-
conn->SetProxy("37.187.100.23:3128");
222+
conn->SetProxy("127.0.0.1:3128");
223223
RestClient::Response res = conn->get("/get");
224224
EXPECT_EQ(200, res.code);
225225
}
226226

227227
TEST_F(ConnectionTest, TestProxyAddressPrefixed)
228228
{
229-
conn->SetProxy("https://37.187.100.23:3128");
229+
conn->SetProxy("https://127.0.0.1:3128");
230230
RestClient::Response res = conn->get("/get");
231231
EXPECT_EQ(200, res.code);
232232
}

0 commit comments

Comments
 (0)