Skip to content

Commit

Permalink
Integrate deployments with a job file
Browse files Browse the repository at this point in the history
    In suite was added deployment and destroy tests. Now suite will work
    with next sequence:
    1. Run deploy test
    2. API tests
    3. WEB tests
    4. Destroy test

    It means have some logic:
    If deploy test is passed > start run API tests, if they passed >
    start run WEB test > and finaly regardless of the result of API & WEB
    tests, will run destroy test.
  • Loading branch information
bambula4000 committed Apr 4, 2019
1 parent 9e5061f commit 1a7070e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
share,
)

_deployment_tests = (deploy_app, destroy_app)
_deployment_test = (deploy_app,)
_destroy_test = (destroy_app,)


def tests_runner(test_suite: Tuple, instance: Any) -> List: # type: ignore
Expand All @@ -88,8 +89,10 @@ def tests_runner(test_suite: Tuple, instance: Any) -> List: # type: ignore


def main(runtime: EasypyRuntime) -> None:
if "failed" not in tests_runner(_api_tests, runtime.testbed):
tests_runner(_web_tests, runtime.testbed)
if "passed" in tests_runner(_deployment_test, runtime.testbed):
if "failed" not in tests_runner(_api_tests, runtime.testbed):
tests_runner(_web_tests, runtime.testbed)
tests_runner(_destroy_test, runtime.testbed)


if __name__ == "__main__":
Expand Down

0 comments on commit 1a7070e

Please sign in to comment.