From 02da77a02073ced3955bab5c1b228da4317db434 Mon Sep 17 00:00:00 2001 From: Denis Makogon Date: Fri, 18 Nov 2016 22:20:11 +0200 Subject: [PATCH] Addressing comments from review --- README.md | 12 ++++++------ laos/api/controllers/apps.py | 3 +-- laos/tests/fakes/functions_api.py | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 175f14c..3d85bb1 100644 --- a/README.md +++ b/README.md @@ -155,8 +155,8 @@ In order to run tests you need to install `Tox`: $ pip install tox -Also you'd need live MySQL instance with applied migrations. -Tests are depending on pre-created MySQL database for persistence. +Also, you will need a running MySQL instance with the database migrations applied from the previous step. +Tests are dependent on pre-created MySQL database for persistence. Please set env var $ export TEST_DB_URI=mysql://:@:/ @@ -164,7 +164,7 @@ Please set env var Testing: PEP8 ------------- -In order to run `PEP8` style checks run next command: +In order to run `PEP8` style checks run following command: $ tox -e pep8 @@ -172,7 +172,7 @@ In order to run `PEP8` style checks run next command: Testing: Functional ------------------- -In order to run `functional` tests run next command: +In order to run `functional` tests run following command: $ tox -e py35-functional @@ -186,7 +186,7 @@ Cons: * MySQL server required * OpenStack authentication is not tested -* IronFunctions API stabbed with fake implementation +* IronFunctions API stubbed with fake implementation Testing: Integration -------------------- @@ -199,7 +199,7 @@ Testing: Coverage regression In order to build quality software it is necessary to keep test coverage at its highest point. So, as part of `Tox` testing new check was added - functional test coverage regression. -In order to run it use next command: +In order to run it use following command: $ tox -e py35-functional-regression diff --git a/laos/api/controllers/apps.py b/laos/api/controllers/apps.py index 5cb04d5..81495aa 100644 --- a/laos/api/controllers/apps.py +++ b/laos/api/controllers/apps.py @@ -210,8 +210,7 @@ class AppV1Controller(controllers.ServiceControllerBase): if fn_app_routes: return web.json_response(data={ "error": { - "message": ("App {} has routes, " - "delete them in first place".format(app)) + "message": ("Unable to delete app {} with routes".format(app)) } }, status=403) diff --git a/laos/tests/fakes/functions_api.py b/laos/tests/fakes/functions_api.py index 2e3acb6..085e22d 100644 --- a/laos/tests/fakes/functions_api.py +++ b/laos/tests/fakes/functions_api.py @@ -36,7 +36,7 @@ class FakeRoutes(object): app_routes = APP_ROUTES[self.app_name] if data.get("path") in [route.path for route in app_routes]: raise client.FunctionsAPIException( - "App {} route {} already exist.".format( + "App {} route {} already exists.".format( self.app_name, data.get("path")), 409) else: data.update(