Skip to content

Commit

Permalink
Small refinements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Sep 26, 2020
1 parent 41797e5 commit 32c41e9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
output
__pycache__
.idea
results.html
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ integration-deployment: prep
-w /integration \
--network host \
metalstack/metal-deployment-base:$(DEPLOYMENT_BASE_IMAGE_TAG) /integration/integration.sh

.PHONY: render-junit
render-junit:
docker run --rm -v $(PWD)/test/integration/deployment/output:/results maxmiorim/junit-viewer > results.html
2 changes: 1 addition & 1 deletion test/integration/deployment/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ pip install \
# if you want to develop tests from within here, comment in the following line:
# bash

nosetests --with-flaky
nosetests --with-flaky --no-flaky-report --with-xunit --xunit-file=/output/results_$(date "+%Y.%m.%d-%H.%M.%S").xml
10 changes: 10 additions & 0 deletions test/integration/deployment/test/deployment_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ def test_api_is_responsive(self):

self.assertEqual(res.name, "metal-api")

def test_api_is_healthy(self):
api = metal_api.HealthApi(api_client=self.driver.client)
try:
res = api.health()
except Exception as exception:
self.fail("api not responsive: %s" % exception)

self.assertEqual(res.status, "healthy")
self.assertEqual(res.message, "OK")

@flaky(max_runs=36, rerun_filter=common.FlakyBackoff(10).backoff)
def test_switches_have_registered(self):
api = metal_api.SwitchApi(api_client=self.driver.client)
Expand Down

0 comments on commit 32c41e9

Please sign in to comment.