This repository has been archived by the owner on Apr 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
109 changed files
with
10,492 additions
and
6,038 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
*.py[co] | ||
*.sw[ponm] | ||
*~ | ||
.DS_Store | ||
.certificates/ | ||
.coverage/ | ||
.idea/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,5 @@ marshmallow >= 2.15, < 3.0.0 | |
marshmallow-sqlalchemy >= 0.13.0 | ||
pynacl | ||
alembic | ||
healthcheck | ||
psycopg2-binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"name": "environmentVariables", | ||
"workflows": [ | ||
{ | ||
"actions": [ | ||
{ | ||
"action_name": "repeatBackToMe", | ||
"app_name": "HelloWorldBounded", | ||
"arguments": [ | ||
{ | ||
"name": "call", | ||
"reference": "d524843a-9caa-4fc1-aa0e-e8dfbdba7490" | ||
} | ||
], | ||
"device_id": { | ||
"name": "__device__", | ||
"value": 1 | ||
}, | ||
"id": "4269a5b5-bbb7-49d9-becc-31152ccc29b7", | ||
"name": "start" | ||
} | ||
], | ||
"environment_variables": [ | ||
{ | ||
"id": "d524843a-9caa-4fc1-aa0e-e8dfbdba7490", | ||
"name": "call", | ||
"value": "CHANGE INPUT", | ||
"type": "str" | ||
} | ||
], | ||
"branches": [], | ||
"name": "environmentVariables", | ||
"start": "4269a5b5-bbb7-49d9-becc-31152ccc29b7" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import unittest | ||
|
||
import walkoff.appgateway | ||
from tests.util import execution_db_help | ||
from tests.util import initialize_test_config | ||
from walkoff.executiondb.environment_variable import EnvironmentVariable | ||
|
||
|
||
class TestAction(unittest.TestCase): | ||
@classmethod | ||
def setUpClass(cls): | ||
initialize_test_config() | ||
execution_db_help.setup_dbs() | ||
|
||
@classmethod | ||
def tearDownClass(cls): | ||
walkoff.appgateway.clear_cache() | ||
execution_db_help.tear_down_execution_db() | ||
|
||
def __compare_init(self, elem, name, value, description): | ||
self.assertEqual(elem.name, name) | ||
self.assertEqual(elem.value, value) | ||
self.assertEqual(elem.description, description) | ||
|
||
def test_init_default(self): | ||
env_var = EnvironmentVariable(name='test_name', value='test_value', description='test_description') | ||
self.__compare_init(env_var, 'test_name', 'test_value', 'test_description') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from tests.util.servertestcase import ServerTestCase | ||
|
||
|
||
class TestHealthEndpoint(ServerTestCase): | ||
|
||
def test_endpoint(self): | ||
response = self.get_with_status_check('/health', status_code=200) | ||
expected_checks = { | ||
'check_cache', | ||
'check_server_db', | ||
'check_execution_db' | ||
} | ||
self.assertEqual(response['status'], 'success') | ||
checks = {result['checker'] for result in response['results']} | ||
self.assertSetEqual(checks, expected_checks) | ||
self.assertTrue(all(result['passed'] for result in response['results'])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.