syncstorage-rs/tools/integration_tests/tokenserver/run.py
JR Conlin dbbdd1dfc3
feat: Remove support for BrowserID (#1531)
* feat: Remove support for BrowserID
* mark test only functions as such. I think we can drop MapAndThenTrait for more recent implementations of rust.

Closes: SYNC-3684
2024-06-14 12:51:02 -07:00

36 lines
1.0 KiB
Python

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import unittest
from tokenserver.test_authorization import TestAuthorization
from tokenserver.test_e2e import TestE2e
from tokenserver.test_misc import TestMisc
from tokenserver.test_node_assignment import TestNodeAssignment
def run_local_tests():
test_classes = [TestAuthorization, TestMisc, TestNodeAssignment]
return run_tests(test_classes)
def run_end_to_end_tests(verbosity=1):
return run_tests([TestE2e], verbosity=verbosity)
def run_tests(test_cases, verbosity=1):
loader = unittest.TestLoader()
success = True
for test_case in test_cases:
suite = loader.loadTestsFromTestCase(test_case)
runner = unittest.TextTestRunner(verbosity=verbosity)
res = runner.run(suite)
success = success and res.wasSuccessful()
if success:
return 0
else:
return 1