Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

baseline test #743

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
- run:
name: nvm install node and UI dependencies
command: |
echo "npm version is $(npm --version)"
echo "nvm version is $(/opt/circleci/.nvm/nvm.sh --version)"
/opt/circleci/.nvm/nvm.sh install --lts
cd ui
npm install
Expand Down
1 change: 1 addition & 0 deletions servers/cromwell/jobs/controllers/utils/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@


def requires_auth(fn):

def wrapper(*args, **kwargs):
auth_token = request.headers.get('Authentication')
auth = _get_user_auth() if not current_app.config['use_caas'] else None
Expand Down
1 change: 1 addition & 0 deletions servers/cromwell/jobs/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@


class BaseTestCase(TestCase):

def create_app(self):
logging.getLogger('connexion.operation').setLevel('ERROR')
app = connexion.App(__name__, specification_dir='../swagger/')
Expand Down
1 change: 1 addition & 0 deletions servers/cromwell/jobs/test/test_auth_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class TestAuthUtils(BaseTestCase):

def setUp(self):
self.base_url = 'https://test-cromwell.org'

Expand Down
1 change: 1 addition & 0 deletions servers/cromwell/jobs/test/test_job_statuses.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@


class TestJobStatuses(BaseTestCase):

def test_cromwell_execution_status_converts_correctly(self):
for key, status in job_statuses.ApiStatus.__dict__.items():
if not key.startswith('__'):
Expand Down
1 change: 1 addition & 0 deletions servers/cromwell/jobs/test/test_jobs_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ def test_query_jobs_returns_200(self, mock_request):

Query jobs by various filter criteria. Returned jobs are ordered from newest to oldest submission time.
"""

def _request_callback(request, context):
context.status_code = 200
return {'results': [], 'totalResultsCount': 0}
Expand Down
1 change: 1 addition & 0 deletions servers/cromwell/jobs/test/test_task_statuses.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def test_unrecognized_task_status_causes_exception(self):
task_statuses.cromwell_execution_to_api('Not a valid task status')

def test_scattered_task_status(self):

def failed_scattered_task():
return [
Shard(execution_status='Failed'),
Expand Down
2 changes: 2 additions & 0 deletions servers/dsub/jobs/test/base_google_test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@


class BaseGoogleTestCases:

class BaseGoogleTestCase(BaseTestCases.JobsControllerTestCase):

@classmethod
def setUpClass(cls):
super(BaseGoogleTestCases.BaseGoogleTestCase, cls).setUpClass()
Expand Down
3 changes: 3 additions & 0 deletions servers/dsub/jobs/test/base_test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@


class BaseTestCases:

class BaseTestCase(flask_testing.TestCase):

def assert_status(self, response, want, desc=None):
if not desc:
desc = 'Response body is : ' + response.data.decode('utf-8')
super(BaseTestCases.BaseTestCase,
self).assertStatus(response, want, desc)

class JobsControllerTestCase(BaseTestCase):

@classmethod
def setUpClass(cls):
cls.testing_root = None
Expand Down
1 change: 1 addition & 0 deletions servers/dsub/jobs/test/test_jobs_controller_google.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

class TestJobsControllerGoogle(BaseGoogleTestCases.BaseGoogleTestCase):
""" JobsController integration tests for the google provider """

def create_app(self):
app = super(TestJobsControllerGoogle, self).create_app()
app.config.update({
Expand Down
1 change: 1 addition & 0 deletions servers/dsub/jobs/test/test_jobs_controller_google_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

class TestJobsControllerGoogleV2(BaseGoogleTestCases.BaseGoogleTestCase):
""" JobsController integration tests for the google v2 provider """

def create_app(self):
app = super(TestJobsControllerGoogleV2, self).create_app()
app.config.update({
Expand Down
1 change: 1 addition & 0 deletions servers/dsub/jobs/test/test_jobs_controller_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

class TestJobsControllerLocal(BaseTestCases.JobsControllerTestCase):
""" JobsController integration tests for local provider """

@classmethod
def setUpClass(cls):
super(TestJobsControllerLocal, cls).setUpClass()
Expand Down
1 change: 1 addition & 0 deletions servers/jm_utils/jm_utils/test/test_page_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

class TestJmUtils(unittest.TestCase):
""" jm_utils unit tests """

def test_encode_decode_offset(self):
encoded = page_tokens.encode_offset(12)
decoded = page_tokens.decode_offset(encoded)
Expand Down