mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Delete running jobs after each API-style test
Should prevent https://jenkins.galaxyproject.org/job/docker-integration-py3/159/testReport/junit/test.integration.test_upload_configuration_options/AdminsCanPasteFilePathsTestCase/test_admin_path_paste_libraries/
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
from contextlib import contextmanager
|
||||
|
||||
from six.moves.urllib.parse import urlencode
|
||||
@@ -22,6 +23,12 @@ from .testcase import FunctionalTestCase
|
||||
|
||||
class UsesApiTestCaseMixin(object):
|
||||
|
||||
def tearDown(self):
|
||||
if os.environ.get('GALAXY_TEST_EXTERNAL') is None:
|
||||
# Only kill running jobs after test for managed test instances
|
||||
for job in self.galaxy_interactor.get('jobs?state=running&?user_details=true').json():
|
||||
self._delete("jobs/%s" % job['id'])
|
||||
|
||||
def _api_url(self, path, params=None, use_key=None, use_admin_key=None):
|
||||
if not params:
|
||||
params = {}
|
||||
|
||||
Reference in New Issue
Block a user