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

Commit

Permalink
Merge pull request #7 from microservices-demo/test/container-stability
Browse files Browse the repository at this point in the history
Container under test should be the commit version, not the tagged ver…
  • Loading branch information
Phil Winder authored Sep 23, 2016
2 parents 88d4525 + b758fff commit 059758c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ script:
- ./scripts/build.sh;
- ./test/test.sh unit.py
# - ./test/test.sh component.py
- ./test/test.sh container.py --tag $TAG
- ./test/test.sh container.py --tag $COMMIT

after_success:
- set -e;
Expand Down
9 changes: 5 additions & 4 deletions test/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ def test_api_validated(self):

if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--tag', default="latest", help='The tag of the image to use. (default: latest)')
default_tag = "latest"
parser.add_argument('--tag', default=default_tag, help='The tag of the image to use. (default: latest)')
parser.add_argument('unittest_args', nargs='*')
args = parser.parse_args()
PaymentContainerTest.TAG = args.tag

if os.environ["TAG"] != "":
PaymentContainerTest.TAG = os.environ["TAG"]
if PaymentContainerTest.TAG == "":
PaymentContainerTest.TAG = default_tag

# Now set the sys.argv to the unittest_args (leaving sys.argv[0] alone)
sys.argv[1:] = args.unittest_args
unittest.main()

0 comments on commit 059758c

Please sign in to comment.