Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit cab762e

Browse files
author
Aleksandr
authored
Merge pull request #9 from microservices-demo/adding-container-test-to-travis
Enabling container travis build
2 parents e6f93fc + 1a1971e commit cab762e

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ env:
1212
script:
1313
- set -e
1414
- ./scripts/build.sh;
15-
- ./test/test.sh unit.py
15+
- travis_wait ./test/test.sh unit.py
1616
- ./test/test.sh component.py
17-
# - ./test/test.sh container.py --tag $TAG
17+
- docker build -t weaveworksdemos/json-server ./test/json-server/
18+
- ./test/test.sh container.py --tag $TAG
1819

1920
after_success:
2021
- set -e;

test/container.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def setUp(self):
6464
'--link',
6565
self.shipping_mock.container_name,
6666
'weaveworksdemos/orders:' + self.COMMIT]
67-
Docker().execute(command)
67+
Docker().execute(command, dump_streams=True)
6868
self.ip = Docker().get_container_ip(OrdersContainerTest.container_name)
6969

7070
def tearDown(self):
@@ -75,13 +75,13 @@ def tearDown(self):
7575
self.shipping_mock.cleanup()
7676

7777
def test_api_validated(self):
78-
limit = 20
78+
limit = 30
7979
while Api().noResponse('http://' + self.ip + ':80/orders'):
8080
if limit == 0:
8181
self.fail("Couldn't get the API running")
8282
limit = limit - 1
8383
sleep(1)
84-
sleep(15)
84+
8585
out = Dredd().test_against_endpoint(
8686
"orders", 'http://' + self.ip + ':80/',
8787
links=[self.mongo_container_name, self.container_name],

test/unit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def test_maven(self):
1111
code_dir = script_dir + "/.."
1212
home = expanduser("~")
1313
command = ['docker', 'run', '--rm', '-v', home + '/.m2:/root/.m2', '-v', code_dir + ':/usr/src/mymaven', '-w',
14-
'/usr/src/mymaven', 'maven:3.2-jdk-8', 'mvn', 'test']
14+
'/usr/src/mymaven', 'maven:3.2-jdk-8', 'mvn', '-q', 'test']
1515
print(Docker().execute(command))
1616

1717

0 commit comments

Comments
 (0)