Navigation Menu

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

Commit

Permalink
Removed cases
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinTervala authored and JustinTervala committed Aug 20, 2018
1 parent 8db00c1 commit e930d02
Show file tree
Hide file tree
Showing 57 changed files with 253 additions and 2,557 deletions.
4 changes: 0 additions & 4 deletions alembic.ini
Expand Up @@ -40,10 +40,6 @@
sqlalchemy.url = sqlite:///./data/walkoff.db
script_location = scripts/migrations/database/walkoff

[events]
sqlalchemy.url = sqlite:///./data/events.db
script_location = scripts/migrations/database/events

[execution]
sqlalchemy.url = sqlite:///./data/execution.db
script_location = scripts/migrations/database/execution
Expand Down
49 changes: 0 additions & 49 deletions apps/Walkoff/api.yaml
Expand Up @@ -185,55 +185,6 @@ actions:
schema:
type: string
description: Unknown HTTP response from server
get all cases:
run: app.Walkoff.get_all_cases
description: Gets a list of all the cases loaded on the system
parameters:
- name: timeout
description: Timeout on the request (in seconds)
type: number
default: 2.0
default_return: Success
returns:
Success:
schema:
type: array
items:
type: object
properties:
id:
type: integer
name:
type: string
note:
type: string
subscriptions:
type: array
items:
type: object
properties:
uid:
type: string
events:
type: array
items:
type: string
TimedOut:
schema:
type: string
enum: ["Connection timed out"]
Unauthorized:
schema:
type: string
enum: ["Unauthorized credentials"]
NotConnected:
schema:
type: string
enum: ["Not connected to Walkoff"]
UnknownResponse:
schema:
type: string
description: Unknown HTTP response from server
get all users:
run: app.Walkoff.get_all_users
description: Gets a list of all the users loaded on the system
Expand Down
5 changes: 0 additions & 5 deletions apps/Walkoff/app.py
Expand Up @@ -88,11 +88,6 @@ def get_app_metrics(self, timeout=DEFAULT_TIMEOUT):
def get_workflow_metrics(self, timeout=DEFAULT_TIMEOUT):
return self.standard_request('get', '/metrics/workflows', timeout, headers=self.headers)

# CASES
@action
def get_all_cases(self, timeout=DEFAULT_TIMEOUT):
return self.standard_request('get', '/api/cases', timeout, headers=self.headers)

# USERS
@action
def get_all_users(self, timeout=DEFAULT_TIMEOUT):
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Expand Up @@ -179,7 +179,6 @@
import walkoff
walkoff.config.Config.KEYWORDS_PATH = '../walkoff/keywords'
walkoff.config.Config.EXECUTION_DB_PATH = '../data/device.db'
walkoff.config.Config.CASE_DB_PATH = '../data/events.db'
walkoff.config.Config.WALKOFF_SCHEMA_PATH = '../data/walkoff_schema.json'
walkoff.config.Config.APPS_PATH = '../apps'
walkoff.config.Config.WORKFLOWS_PATH = '../workflows'
Expand Down
5 changes: 1 addition & 4 deletions run_all_tests.py
Expand Up @@ -11,8 +11,7 @@


def delete_dbs():
db_paths = [tests.config.TestConfig.CASE_DB_PATH, tests.config.TestConfig.EXECUTION_DB_PATH,
tests.config.TestConfig.DB_PATH]
db_paths = (tests.config.TestConfig.EXECUTION_DB_PATH, tests.config.TestConfig.DB_PATH)
for db in db_paths:
if os.path.exists(db):
os.remove(db)
Expand All @@ -28,8 +27,6 @@ def run_tests():
ret &= unittest.TextTestRunner(verbosity=1).run(test_suites.workflow_suite).wasSuccessful()
print('\nTesting Execution:')
ret &= unittest.TextTestRunner(verbosity=1).run(test_suites.execution_suite).wasSuccessful()
print('\nTesting Cases:')
ret &= unittest.TextTestRunner(verbosity=1).run(test_suites.case_suite).wasSuccessful()
print('\nTesting Server:')
ret &= unittest.TextTestRunner(verbosity=1).run(test_suites.server_suite).wasSuccessful()
print('\nTesting Interface:')
Expand Down
4 changes: 0 additions & 4 deletions tests/__init__.py
Expand Up @@ -15,10 +15,6 @@
'test_authentication',
'test_branch',
'test_callback_container',
'test_case_database',
'test_case_logger',
'test_case_server',
'test_case_subscriptions',
'test_configuration_server',
'test_console_logging_handler',
'test_console_stream',
Expand Down
1 change: 0 additions & 1 deletion tests/config.py
Expand Up @@ -16,7 +16,6 @@ class TestConfig(walkoff.config.Config):
DEFAULT_CASE_EXPORT_PATH = join(DATA_PATH, 'cases.json')
BASIC_APP_API = join('.', 'tests', 'schemas', 'basic_app_api.yaml')
CACHE_PATH = join('.', 'tests', 'tmp', 'cache')
CASE_DB_PATH = abspath(join('.', 'tests', 'tmp', 'events_test.db'))
DB_PATH = abspath(join('.', 'tests', 'tmp', 'walkoff_test.db'))
EXECUTION_DB_PATH = abspath(join('.', 'tests', 'tmp', 'execution_test.db'))
NUMBER_PROCESSES = 2
Expand Down
9 changes: 2 additions & 7 deletions tests/suites.py
Expand Up @@ -6,12 +6,7 @@
def add_tests_to_suite(suite, test_modules):
suite.addTests([TestLoader().loadTestsFromModule(test_module) for test_module in test_modules])


__case_tests = [test_case_subscriptions, test_case_database, test_case_logger]
case_suite = TestSuite()
add_tests_to_suite(case_suite, __case_tests)

__server_tests = [test_workflow_server, test_app_api_server, test_case_server, test_configuration_server,
__server_tests = [test_workflow_server, test_app_api_server, test_configuration_server,
test_scheduler_actions, test_device_server, test_app_blueprint, test_metrics_server,
test_scheduledtasks_database, test_scheduledtasks_server, test_authentication, test_roles_server,
test_users_server, test_message_history_database, test_message_db, test_message,
Expand Down Expand Up @@ -50,5 +45,5 @@ def add_tests_to_suite(suite, test_modules):
add_tests_to_suite(interface_suite, __interface_tests)

full_suite = TestSuite()
for tests in [__workflow_tests, __execution_tests, __case_tests, __server_tests, __interface_tests]:
for tests in [__workflow_tests, __execution_tests, __server_tests, __interface_tests]:
add_tests_to_suite(full_suite, tests)
2 changes: 1 addition & 1 deletion tests/test_app_base.py
Expand Up @@ -14,7 +14,7 @@ class TestAppBase(TestCase):
@classmethod
def setUpClass(cls):
initialize_test_config()
cls.execution_db, _ = execution_db_help.setup_dbs()
cls.execution_db = execution_db_help.setup_dbs()
cls.cache = MockRedisCacheAdapter()

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion tests/test_app_utilities.py
Expand Up @@ -9,7 +9,7 @@ class TestAppUtilities(unittest.TestCase):
@classmethod
def setUpClass(cls):
initialize_test_config()
cls.execution_db, _ = execution_db_help.setup_dbs()
cls.execution_db = execution_db_help.setup_dbs()

app = cls.execution_db.session.query(App).filter(App.name == 'TestApp').first()
if app is not None:
Expand Down
155 changes: 0 additions & 155 deletions tests/test_case_database.py

This file was deleted.

0 comments on commit e930d02

Please sign in to comment.