mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +03:00
Bypass task runner system in normal job start tests... we'll test it another way so assume we want to just start the job right away
This commit is contained in:
parent
1093b00e2a
commit
14e138a7bd
@ -709,7 +709,10 @@ class InventorySource(PrimordialModel):
|
|||||||
def update(self, **kwargs):
|
def update(self, **kwargs):
|
||||||
if self.can_update:
|
if self.can_update:
|
||||||
inventory_update = self.inventory_updates.create()
|
inventory_update = self.inventory_updates.create()
|
||||||
inventory_update.signal_start(**kwargs)
|
if hasattr(settings, 'CELERY_UNIT_TEST'):
|
||||||
|
inventory_update.start(None, **kwargs)
|
||||||
|
else:
|
||||||
|
inventory_update.signal_start(**kwargs)
|
||||||
return inventory_update
|
return inventory_update
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
|
@ -385,6 +385,8 @@ class Job(CommonTask):
|
|||||||
return dependencies
|
return dependencies
|
||||||
|
|
||||||
def signal_start(self, **kwargs):
|
def signal_start(self, **kwargs):
|
||||||
|
if hasattr(settings, 'CELERY_UNIT_TEST'):
|
||||||
|
return self.start(None, **kwargs)
|
||||||
if not self.can_start:
|
if not self.can_start:
|
||||||
return False
|
return False
|
||||||
needed = self._get_passwords_needed_to_start()
|
needed = self._get_passwords_needed_to_start()
|
||||||
|
@ -295,7 +295,10 @@ class Project(CommonModel):
|
|||||||
def update(self, **kwargs):
|
def update(self, **kwargs):
|
||||||
if self.can_update:
|
if self.can_update:
|
||||||
project_update = self.project_updates.create()
|
project_update = self.project_updates.create()
|
||||||
project_update.signal_start(**kwargs)
|
if hasattr(settings, 'CELERY_UNIT_TEST'):
|
||||||
|
project_update.start(None, **kwargs)
|
||||||
|
else:
|
||||||
|
project_update.signal_start(**kwargs)
|
||||||
return project_update
|
return project_update
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
|
@ -323,13 +323,11 @@ class CleanupJobsTest(BaseCommandMixin, BaseLiveServerTest):
|
|||||||
self.project = None
|
self.project = None
|
||||||
self.credential = None
|
self.credential = None
|
||||||
settings.INTERNAL_API_URL = self.live_server_url
|
settings.INTERNAL_API_URL = self.live_server_url
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
super(CleanupJobsTest, self).tearDown()
|
super(CleanupJobsTest, self).tearDown()
|
||||||
self.terminate_queue()
|
self.terminate_queue()
|
||||||
self.terminate_taskmanager()
|
|
||||||
if self.test_project_path:
|
if self.test_project_path:
|
||||||
shutil.rmtree(self.test_project_path, True)
|
shutil.rmtree(self.test_project_path, True)
|
||||||
|
|
||||||
|
@ -993,12 +993,10 @@ class InventoryUpdatesTest(BaseTransactionTest):
|
|||||||
self.group = self.inventory.groups.create(name='Cloud Group')
|
self.group = self.inventory.groups.create(name='Cloud Group')
|
||||||
self.inventory2 = self.organization.inventories.create(name='Cloud Inventory 2')
|
self.inventory2 = self.organization.inventories.create(name='Cloud Inventory 2')
|
||||||
self.group2 = self.inventory2.groups.create(name='Cloud Group 2')
|
self.group2 = self.inventory2.groups.create(name='Cloud Group 2')
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
super(InventoryUpdatesTest, self).tearDown()
|
super(InventoryUpdatesTest, self).tearDown()
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.terminate_queue()
|
self.terminate_queue()
|
||||||
|
|
||||||
def update_inventory_source(self, group, **kwargs):
|
def update_inventory_source(self, group, **kwargs):
|
||||||
|
@ -447,13 +447,11 @@ class BaseJobTestMixin(BaseTestMixin):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(BaseJobTestMixin, self).setUp()
|
super(BaseJobTestMixin, self).setUp()
|
||||||
self.populate()
|
self.populate()
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
if settings.CALLBACK_CONSUMER_PORT:
|
if settings.CALLBACK_CONSUMER_PORT:
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
super(BaseJobTestMixin, self).tearDown()
|
super(BaseJobTestMixin, self).tearDown()
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.terminate_queue()
|
self.terminate_queue()
|
||||||
|
|
||||||
class JobTemplateTest(BaseJobTestMixin, django.test.TestCase):
|
class JobTemplateTest(BaseJobTestMixin, django.test.TestCase):
|
||||||
@ -785,7 +783,6 @@ class JobTest(BaseJobTestMixin, django.test.TestCase):
|
|||||||
# asynchronously; the start API call will update the database, queue the task,
|
# asynchronously; the start API call will update the database, queue the task,
|
||||||
# then return immediately (committing the transaction) before celery has even
|
# then return immediately (committing the transaction) before celery has even
|
||||||
# woken up to run the new task.
|
# woken up to run the new task.
|
||||||
# FIXME: TODO: These tests are completely broken at the moment, we cover a lot of the run actions in the tasks tests anyway
|
|
||||||
MIDDLEWARE_CLASSES = filter(lambda x: not x.endswith('TransactionMiddleware'),
|
MIDDLEWARE_CLASSES = filter(lambda x: not x.endswith('TransactionMiddleware'),
|
||||||
settings.MIDDLEWARE_CLASSES)
|
settings.MIDDLEWARE_CLASSES)
|
||||||
|
|
||||||
@ -902,133 +899,133 @@ class JobStartCancelTest(BaseJobTestMixin, django.test.LiveServerTestCase):
|
|||||||
|
|
||||||
# FIXME: Test with other users, test when passwords are required.
|
# FIXME: Test with other users, test when passwords are required.
|
||||||
|
|
||||||
# def test_job_cancel(self):
|
def test_job_cancel(self):
|
||||||
# #job = self.job_ops_east_run
|
#job = self.job_ops_east_run
|
||||||
# job = self.make_job(self.jt_ops_east_run, self.user_sue, 'new')
|
job = self.make_job(self.jt_ops_east_run, self.user_sue, 'new')
|
||||||
# url = reverse('api:job_cancel', args=(job.pk,))
|
url = reverse('api:job_cancel', args=(job.pk,))
|
||||||
|
|
||||||
# # Test with no auth and with invalid login.
|
# Test with no auth and with invalid login.
|
||||||
# self.check_invalid_auth(url)
|
self.check_invalid_auth(url)
|
||||||
# self.check_invalid_auth(url, methods=('post',))
|
self.check_invalid_auth(url, methods=('post',))
|
||||||
|
|
||||||
# # sue can cancel the job, but only when it is pending or running.
|
# sue can cancel the job, but only when it is pending or running.
|
||||||
# for status in [x[0] for x in TASK_STATUS_CHOICES]:
|
for status in [x[0] for x in TASK_STATUS_CHOICES]:
|
||||||
# if status == 'waiting':
|
if status == 'waiting':
|
||||||
# continue
|
continue
|
||||||
# job.status = status
|
job.status = status
|
||||||
# job.save()
|
job.save()
|
||||||
# with self.current_user(self.user_sue):
|
with self.current_user(self.user_sue):
|
||||||
# response = self.get(url)
|
response = self.get(url)
|
||||||
# if status in ('pending', 'running'):
|
if status in ('pending', 'running'):
|
||||||
# self.assertTrue(response['can_cancel'])
|
self.assertTrue(response['can_cancel'])
|
||||||
# response = self.post(url, {}, expect=202)
|
response = self.post(url, {}, expect=202)
|
||||||
# else:
|
else:
|
||||||
# self.assertFalse(response['can_cancel'])
|
self.assertFalse(response['can_cancel'])
|
||||||
# response = self.post(url, {}, expect=405)
|
response = self.post(url, {}, expect=405)
|
||||||
|
|
||||||
# FIXME: Test with other users.
|
# FIXME: Test with other users.
|
||||||
|
|
||||||
# def test_get_job_results(self):
|
def test_get_job_results(self):
|
||||||
# # Start/run a job and then access its results via the API.
|
# Start/run a job and then access its results via the API.
|
||||||
# #job = self.job_ops_east_run
|
#job = self.job_ops_east_run
|
||||||
# job = self.make_job(self.jt_ops_east_run, self.user_sue, 'new')
|
job = self.make_job(self.jt_ops_east_run, self.user_sue, 'new')
|
||||||
# job.signal_start()
|
job.start()
|
||||||
|
|
||||||
# # Check that the job detail has been updated.
|
# Check that the job detail has been updated.
|
||||||
# url = reverse('api:job_detail', args=(job.pk,))
|
url = reverse('api:job_detail', args=(job.pk,))
|
||||||
# with self.current_user(self.user_sue):
|
with self.current_user(self.user_sue):
|
||||||
# response = self.get(url)
|
response = self.get(url)
|
||||||
# self.assertEqual(response['status'], 'successful',
|
self.assertEqual(response['status'], 'successful',
|
||||||
# response['result_traceback'])
|
response['result_traceback'])
|
||||||
# self.assertTrue(response['result_stdout'])
|
self.assertTrue(response['result_stdout'])
|
||||||
|
|
||||||
# # Test job events for completed job.
|
# Test job events for completed job.
|
||||||
# url = reverse('api:job_job_events_list', args=(job.pk,))
|
url = reverse('api:job_job_events_list', args=(job.pk,))
|
||||||
# with self.current_user(self.user_sue):
|
with self.current_user(self.user_sue):
|
||||||
# response = self.get(url)
|
response = self.get(url)
|
||||||
# qs = job.job_events.all()
|
qs = job.job_events.all()
|
||||||
# self.assertTrue(qs.count())
|
self.assertTrue(qs.count())
|
||||||
# self.check_pagination_and_size(response, qs.count())
|
self.check_pagination_and_size(response, qs.count())
|
||||||
# self.check_list_ids(response, qs)
|
self.check_list_ids(response, qs)
|
||||||
|
|
||||||
# # Test individual job event detail records.
|
# Test individual job event detail records.
|
||||||
# host_ids = set()
|
host_ids = set()
|
||||||
# for job_event in job.job_events.all():
|
for job_event in job.job_events.all():
|
||||||
# if job_event.host:
|
if job_event.host:
|
||||||
# host_ids.add(job_event.host.pk)
|
host_ids.add(job_event.host.pk)
|
||||||
# url = reverse('api:job_event_detail', args=(job_event.pk,))
|
url = reverse('api:job_event_detail', args=(job_event.pk,))
|
||||||
# with self.current_user(self.user_sue):
|
with self.current_user(self.user_sue):
|
||||||
# response = self.get(url)
|
response = self.get(url)
|
||||||
|
|
||||||
# # Also test job event list for each host.
|
# Also test job event list for each host.
|
||||||
# if getattr(settings, 'CAPTURE_JOB_EVENT_HOSTS', False):
|
if getattr(settings, 'CAPTURE_JOB_EVENT_HOSTS', False):
|
||||||
# for host in Host.objects.filter(pk__in=host_ids):
|
for host in Host.objects.filter(pk__in=host_ids):
|
||||||
# url = reverse('api:host_job_events_list', args=(host.pk,))
|
url = reverse('api:host_job_events_list', args=(host.pk,))
|
||||||
# with self.current_user(self.user_sue):
|
with self.current_user(self.user_sue):
|
||||||
# response = self.get(url)
|
response = self.get(url)
|
||||||
# qs = host.job_events.all()
|
qs = host.job_events.all()
|
||||||
# self.assertTrue(qs.count())
|
self.assertTrue(qs.count())
|
||||||
# self.check_pagination_and_size(response, qs.count())
|
self.check_pagination_and_size(response, qs.count())
|
||||||
# self.check_list_ids(response, qs)
|
self.check_list_ids(response, qs)
|
||||||
|
|
||||||
# # Test job event list for groups.
|
# Test job event list for groups.
|
||||||
# for group in self.inv_ops_east.groups.all():
|
for group in self.inv_ops_east.groups.all():
|
||||||
# url = reverse('api:group_job_events_list', args=(group.pk,))
|
url = reverse('api:group_job_events_list', args=(group.pk,))
|
||||||
# with self.current_user(self.user_sue):
|
with self.current_user(self.user_sue):
|
||||||
# response = self.get(url)
|
response = self.get(url)
|
||||||
# qs = group.job_events.all()
|
qs = group.job_events.all()
|
||||||
# self.assertTrue(qs.count(), group)
|
self.assertTrue(qs.count(), group)
|
||||||
# self.check_pagination_and_size(response, qs.count())
|
self.check_pagination_and_size(response, qs.count())
|
||||||
# self.check_list_ids(response, qs)
|
self.check_list_ids(response, qs)
|
||||||
|
|
||||||
# # Test global job event list.
|
# Test global job event list.
|
||||||
# url = reverse('api:job_event_list')
|
url = reverse('api:job_event_list')
|
||||||
# with self.current_user(self.user_sue):
|
with self.current_user(self.user_sue):
|
||||||
# response = self.get(url)
|
response = self.get(url)
|
||||||
# qs = JobEvent.objects.all()
|
qs = JobEvent.objects.all()
|
||||||
# self.assertTrue(qs.count())
|
self.assertTrue(qs.count())
|
||||||
# self.check_pagination_and_size(response, qs.count())
|
self.check_pagination_and_size(response, qs.count())
|
||||||
# self.check_list_ids(response, qs)
|
self.check_list_ids(response, qs)
|
||||||
|
|
||||||
# # Test job host summaries for completed job.
|
# Test job host summaries for completed job.
|
||||||
# url = reverse('api:job_job_host_summaries_list', args=(job.pk,))
|
url = reverse('api:job_job_host_summaries_list', args=(job.pk,))
|
||||||
# with self.current_user(self.user_sue):
|
with self.current_user(self.user_sue):
|
||||||
# response = self.get(url)
|
response = self.get(url)
|
||||||
# qs = job.job_host_summaries.all()
|
qs = job.job_host_summaries.all()
|
||||||
# self.assertTrue(qs.count())
|
self.assertTrue(qs.count())
|
||||||
# self.check_pagination_and_size(response, qs.count())
|
self.check_pagination_and_size(response, qs.count())
|
||||||
# self.check_list_ids(response, qs)
|
self.check_list_ids(response, qs)
|
||||||
# # Every host referenced by a job_event should be present as a job
|
# Every host referenced by a job_event should be present as a job
|
||||||
# # host summary record.
|
# host summary record.
|
||||||
# self.assertEqual(host_ids,
|
self.assertEqual(host_ids,
|
||||||
# set(qs.values_list('host__pk', flat=True)))
|
set(qs.values_list('host__pk', flat=True)))
|
||||||
|
|
||||||
# # Test individual job host summary records.
|
# Test individual job host summary records.
|
||||||
# for job_host_summary in job.job_host_summaries.all():
|
for job_host_summary in job.job_host_summaries.all():
|
||||||
# url = reverse('api:job_host_summary_detail',
|
url = reverse('api:job_host_summary_detail',
|
||||||
# args=(job_host_summary.pk,))
|
args=(job_host_summary.pk,))
|
||||||
# with self.current_user(self.user_sue):
|
with self.current_user(self.user_sue):
|
||||||
# response = self.get(url)
|
response = self.get(url)
|
||||||
|
|
||||||
# # Test job host summaries for each host.
|
# Test job host summaries for each host.
|
||||||
# for host in Host.objects.filter(pk__in=host_ids):
|
for host in Host.objects.filter(pk__in=host_ids):
|
||||||
# url = reverse('api:host_job_host_summaries_list', args=(host.pk,))
|
url = reverse('api:host_job_host_summaries_list', args=(host.pk,))
|
||||||
# with self.current_user(self.user_sue):
|
with self.current_user(self.user_sue):
|
||||||
# response = self.get(url)
|
response = self.get(url)
|
||||||
# qs = host.job_host_summaries.all()
|
qs = host.job_host_summaries.all()
|
||||||
# self.assertTrue(qs.count())
|
self.assertTrue(qs.count())
|
||||||
# self.check_pagination_and_size(response, qs.count())
|
self.check_pagination_and_size(response, qs.count())
|
||||||
# self.check_list_ids(response, qs)
|
self.check_list_ids(response, qs)
|
||||||
|
|
||||||
# # Test job host summaries for groups.
|
# Test job host summaries for groups.
|
||||||
# for group in self.inv_ops_east.groups.all():
|
for group in self.inv_ops_east.groups.all():
|
||||||
# url = reverse('api:group_job_host_summaries_list', args=(group.pk,))
|
url = reverse('api:group_job_host_summaries_list', args=(group.pk,))
|
||||||
# with self.current_user(self.user_sue):
|
with self.current_user(self.user_sue):
|
||||||
# response = self.get(url)
|
response = self.get(url)
|
||||||
# qs = group.job_host_summaries.all()
|
qs = group.job_host_summaries.all()
|
||||||
# self.assertTrue(qs.count())
|
self.assertTrue(qs.count())
|
||||||
# self.check_pagination_and_size(response, qs.count())
|
self.check_pagination_and_size(response, qs.count())
|
||||||
# self.check_list_ids(response, qs)
|
self.check_list_ids(response, qs)
|
||||||
|
|
||||||
@override_settings(CELERY_ALWAYS_EAGER=True,
|
@override_settings(CELERY_ALWAYS_EAGER=True,
|
||||||
CELERY_EAGER_PROPAGATES_EXCEPTIONS=True,
|
CELERY_EAGER_PROPAGATES_EXCEPTIONS=True,
|
||||||
@ -1179,9 +1176,8 @@ class JobTemplateCallbackTest(BaseJobTestMixin, django.test.LiveServerTestCase):
|
|||||||
job = jobs_qs[0]
|
job = jobs_qs[0]
|
||||||
self.assertEqual(job.launch_type, 'callback')
|
self.assertEqual(job.launch_type, 'callback')
|
||||||
self.assertEqual(job.limit, host.name)
|
self.assertEqual(job.limit, host.name)
|
||||||
# TODO: Actual job runs are broken in this
|
self.assertEqual(job.hosts.count(), 1)
|
||||||
#self.assertEqual(job.hosts.count(), 1)
|
self.assertEqual(job.hosts.all()[0], host)
|
||||||
#self.assertEqual(job.hosts.all()[0], host)
|
|
||||||
|
|
||||||
# GET as unauthenticated user will prompt for authentication.
|
# GET as unauthenticated user will prompt for authentication.
|
||||||
self.get(url, expect=401, remote_addr=host_ip)
|
self.get(url, expect=401, remote_addr=host_ip)
|
||||||
@ -1224,9 +1220,8 @@ class JobTemplateCallbackTest(BaseJobTestMixin, django.test.LiveServerTestCase):
|
|||||||
job = jobs_qs[0]
|
job = jobs_qs[0]
|
||||||
self.assertEqual(job.launch_type, 'callback')
|
self.assertEqual(job.launch_type, 'callback')
|
||||||
self.assertEqual(job.limit, host.name)
|
self.assertEqual(job.limit, host.name)
|
||||||
# TODO: Actual job runs are broken in this
|
self.assertEqual(job.hosts.count(), 1)
|
||||||
#self.assertEqual(job.hosts.count(), 1)
|
self.assertEqual(job.hosts.all()[0], host)
|
||||||
#self.assertEqual(job.hosts.all()[0], host)
|
|
||||||
|
|
||||||
# Try using an IP for the host that doesn't resolve via reverse lookup,
|
# Try using an IP for the host that doesn't resolve via reverse lookup,
|
||||||
# but can be found by doing a forward lookup on the host name.
|
# but can be found by doing a forward lookup on the host name.
|
||||||
@ -1250,9 +1245,8 @@ class JobTemplateCallbackTest(BaseJobTestMixin, django.test.LiveServerTestCase):
|
|||||||
job = jobs_qs[0]
|
job = jobs_qs[0]
|
||||||
self.assertEqual(job.launch_type, 'callback')
|
self.assertEqual(job.launch_type, 'callback')
|
||||||
self.assertEqual(job.limit, host.name)
|
self.assertEqual(job.limit, host.name)
|
||||||
# TODO: Actual job runs are broken in this
|
self.assertEqual(job.hosts.count(), 1)
|
||||||
#self.assertEqual(job.hosts.count(), 1)
|
self.assertEqual(job.hosts.all()[0], host)
|
||||||
#self.assertEqual(job.hosts.all()[0], host)
|
|
||||||
|
|
||||||
# Try using address only specified via ansible_ssh_host.
|
# Try using address only specified via ansible_ssh_host.
|
||||||
host_qs = job_template.inventory.hosts.order_by('pk')
|
host_qs = job_template.inventory.hosts.order_by('pk')
|
||||||
@ -1265,9 +1259,8 @@ class JobTemplateCallbackTest(BaseJobTestMixin, django.test.LiveServerTestCase):
|
|||||||
job = jobs_qs[0]
|
job = jobs_qs[0]
|
||||||
self.assertEqual(job.launch_type, 'callback')
|
self.assertEqual(job.launch_type, 'callback')
|
||||||
self.assertEqual(job.limit, host.name)
|
self.assertEqual(job.limit, host.name)
|
||||||
# TODO: Actual job runs are broken in this
|
self.assertEqual(job.hosts.count(), 1)
|
||||||
#self.assertEqual(job.hosts.count(), 1)
|
self.assertEqual(job.hosts.all()[0], host)
|
||||||
#self.assertEqual(job.hosts.all()[0], host)
|
|
||||||
|
|
||||||
# Try when hostname is also an IP address, even if a different one is
|
# Try when hostname is also an IP address, even if a different one is
|
||||||
# specified via ansible_ssh_host.
|
# specified via ansible_ssh_host.
|
||||||
@ -1293,9 +1286,8 @@ class JobTemplateCallbackTest(BaseJobTestMixin, django.test.LiveServerTestCase):
|
|||||||
job = jobs_qs[0]
|
job = jobs_qs[0]
|
||||||
self.assertEqual(job.launch_type, 'callback')
|
self.assertEqual(job.launch_type, 'callback')
|
||||||
self.assertEqual(job.limit, host.name)
|
self.assertEqual(job.limit, host.name)
|
||||||
# TODO: Actual job runs are broken in this
|
self.assertEqual(job.hosts.count(), 1)
|
||||||
#self.assertEqual(job.hosts.count(), 1)
|
self.assertEqual(job.hosts.all()[0], host)
|
||||||
#self.assertEqual(job.hosts.all()[0], host)
|
|
||||||
|
|
||||||
# Find a new job template to use.
|
# Find a new job template to use.
|
||||||
job_template = None
|
job_template = None
|
||||||
|
@ -674,17 +674,18 @@ class ProjectsTest(BaseTest):
|
|||||||
@override_settings(CELERY_ALWAYS_EAGER=True,
|
@override_settings(CELERY_ALWAYS_EAGER=True,
|
||||||
CELERY_EAGER_PROPAGATES_EXCEPTIONS=True,
|
CELERY_EAGER_PROPAGATES_EXCEPTIONS=True,
|
||||||
ANSIBLE_TRANSPORT='local',
|
ANSIBLE_TRANSPORT='local',
|
||||||
UNIT_TEST_IGNORE_TASK_WAIT=True,
|
|
||||||
PROJECT_UPDATE_IDLE_TIMEOUT=60,
|
PROJECT_UPDATE_IDLE_TIMEOUT=60,
|
||||||
PROJECT_UPDATE_VVV=True)
|
PROJECT_UPDATE_VVV=True)
|
||||||
class ProjectUpdatesTest(BaseTransactionTest):
|
class ProjectUpdatesTest(BaseTransactionTest):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(ProjectUpdatesTest, self).setUp()
|
super(ProjectUpdatesTest, self).setUp()
|
||||||
|
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
||||||
self.setup_users()
|
self.setup_users()
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
super(ProjectUpdatesTest, self).tearDown()
|
super(ProjectUpdatesTest, self).tearDown()
|
||||||
|
self.terminate_queue()
|
||||||
|
|
||||||
def create_project(self, **kwargs):
|
def create_project(self, **kwargs):
|
||||||
cred_fields = ['scm_username', 'scm_password', 'scm_key_data',
|
cred_fields = ['scm_username', 'scm_password', 'scm_key_data',
|
||||||
@ -1111,10 +1112,7 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
else:
|
else:
|
||||||
self.check_project_update(project, should_fail=should_still_fail)
|
self.check_project_update(project, should_fail=should_still_fail)
|
||||||
|
|
||||||
@override_settings(IGNORE_CELERY_INSPECTOR=True)
|
|
||||||
def test_create_project_with_scm(self):
|
def test_create_project_with_scm(self):
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
|
||||||
scm_url = getattr(settings, 'TEST_GIT_PUBLIC_HTTPS',
|
scm_url = getattr(settings, 'TEST_GIT_PUBLIC_HTTPS',
|
||||||
'https://github.com/ansible/ansible.github.com.git')
|
'https://github.com/ansible/ansible.github.com.git')
|
||||||
if not all([scm_url]):
|
if not all([scm_url]):
|
||||||
@ -1185,12 +1183,8 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
}
|
}
|
||||||
with self.current_user(self.super_django_user):
|
with self.current_user(self.super_django_user):
|
||||||
self.post(projects_url, project_data, expect=201)
|
self.post(projects_url, project_data, expect=201)
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.terminate_queue()
|
|
||||||
|
|
||||||
def test_public_git_project_over_https(self):
|
def test_public_git_project_over_https(self):
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
|
||||||
scm_url = getattr(settings, 'TEST_GIT_PUBLIC_HTTPS',
|
scm_url = getattr(settings, 'TEST_GIT_PUBLIC_HTTPS',
|
||||||
'https://github.com/ansible/ansible.github.com.git')
|
'https://github.com/ansible/ansible.github.com.git')
|
||||||
if not all([scm_url]):
|
if not all([scm_url]):
|
||||||
@ -1214,12 +1208,8 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
scm_password=scm_password,
|
scm_password=scm_password,
|
||||||
)
|
)
|
||||||
self.check_project_update(project2)
|
self.check_project_update(project2)
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.terminate_queue()
|
|
||||||
|
|
||||||
def test_private_git_project_over_https(self):
|
def test_private_git_project_over_https(self):
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
|
||||||
scm_url = getattr(settings, 'TEST_GIT_PRIVATE_HTTPS', '')
|
scm_url = getattr(settings, 'TEST_GIT_PRIVATE_HTTPS', '')
|
||||||
scm_username = getattr(settings, 'TEST_GIT_USERNAME', '')
|
scm_username = getattr(settings, 'TEST_GIT_USERNAME', '')
|
||||||
scm_password = getattr(settings, 'TEST_GIT_PASSWORD', '')
|
scm_password = getattr(settings, 'TEST_GIT_PASSWORD', '')
|
||||||
@ -1233,12 +1223,8 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
scm_password=scm_password,
|
scm_password=scm_password,
|
||||||
)
|
)
|
||||||
self.check_project_scm(project)
|
self.check_project_scm(project)
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.termiante_queue()
|
|
||||||
|
|
||||||
def test_private_git_project_over_ssh(self):
|
def test_private_git_project_over_ssh(self):
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
|
||||||
scm_url = getattr(settings, 'TEST_GIT_PRIVATE_SSH', '')
|
scm_url = getattr(settings, 'TEST_GIT_PRIVATE_SSH', '')
|
||||||
scm_key_data = getattr(settings, 'TEST_GIT_KEY_DATA', '')
|
scm_key_data = getattr(settings, 'TEST_GIT_KEY_DATA', '')
|
||||||
scm_username = getattr(settings, 'TEST_GIT_USERNAME', '')
|
scm_username = getattr(settings, 'TEST_GIT_USERNAME', '')
|
||||||
@ -1264,59 +1250,50 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
should_error = bool('github.com' in scm_url and scm_username != 'git')
|
should_error = bool('github.com' in scm_url and scm_username != 'git')
|
||||||
self.check_project_update(project2, should_fail=None)#,
|
self.check_project_update(project2, should_fail=None)#,
|
||||||
#should_error=should_error)
|
#should_error=should_error)
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.terminate_queue()
|
|
||||||
|
|
||||||
# TODO: This does not work well with the new task system. Rework.
|
def test_scm_key_unlock_on_project_update(self):
|
||||||
# @override_settings(IGNORE_CELERY_INSPECTOR=True, DEBUG=True)
|
scm_url = 'git@github.com:ansible/ansible.github.com.git'
|
||||||
# def _test_scm_key_unlock_on_project_update(self):
|
project = self.create_project(
|
||||||
# self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
name='my git project over ssh with encrypted key',
|
||||||
# self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
scm_type='git',
|
||||||
# scm_url = 'git@github.com:ansible/ansible.github.com.git'
|
scm_url=scm_url,
|
||||||
# project = self.create_project(
|
scm_key_data=TEST_SSH_KEY_DATA_LOCKED,
|
||||||
# name='my git project over ssh with encrypted key',
|
scm_key_unlock=TEST_SSH_KEY_DATA_UNLOCK,
|
||||||
# scm_type='git',
|
)
|
||||||
# scm_url=scm_url,
|
url = reverse('api:project_update_view', args=(project.pk,))
|
||||||
# scm_key_data=TEST_SSH_KEY_DATA_LOCKED,
|
with self.current_user(self.super_django_user):
|
||||||
# scm_key_unlock=TEST_SSH_KEY_DATA_UNLOCK,
|
response = self.get(url, expect=200)
|
||||||
# )
|
self.assertTrue(response['can_update'])
|
||||||
# url = reverse('api:project_update_view', args=(project.pk,))
|
with self.current_user(self.super_django_user):
|
||||||
# with self.current_user(self.super_django_user):
|
response = self.post(url, {}, expect=202)
|
||||||
# response = self.get(url, expect=200)
|
time.sleep(15)
|
||||||
# self.assertTrue(response['can_update'])
|
project_update = project.project_updates.filter(status='successful').order_by('-pk')[0]
|
||||||
# with self.current_user(self.super_django_user):
|
self.check_project_update(project, should_fail=None,
|
||||||
# response = self.post(url, {}, expect=202)
|
project_update=project_update)
|
||||||
# time.sleep(15)
|
# Verify that we responded to ssh-agent prompt.
|
||||||
# print("PU: " + str(project.project_updates.all()[0].result_traceback))
|
self.assertTrue('Identity added' in project_update.result_stdout,
|
||||||
# project_update = project.project_updates.filter(status='successful').order_by('-pk')[0]
|
project_update.result_stdout)
|
||||||
# self.check_project_update(project, should_fail=None,
|
# Try again with a bad unlock password.
|
||||||
# project_update=project_update)
|
project = self.create_project(
|
||||||
# # Verify that we responded to ssh-agent prompt.
|
name='my git project over ssh with encrypted key and bad pass',
|
||||||
# self.assertTrue('Identity added' in project_update.result_stdout,
|
scm_type='git',
|
||||||
# project_update.result_stdout)
|
scm_url=scm_url,
|
||||||
# # Try again with a bad unlock password.
|
scm_key_data=TEST_SSH_KEY_DATA_LOCKED,
|
||||||
# project = self.create_project(
|
scm_key_unlock='not the right password',
|
||||||
# name='my git project over ssh with encrypted key and bad pass',
|
)
|
||||||
# scm_type='git',
|
with self.current_user(self.super_django_user):
|
||||||
# scm_url=scm_url,
|
response = self.get(url, expect=200)
|
||||||
# scm_key_data=TEST_SSH_KEY_DATA_LOCKED,
|
self.assertTrue(response['can_update'])
|
||||||
# scm_key_unlock='not the right password',
|
with self.current_user(self.super_django_user):
|
||||||
# )
|
response = self.post(url, {}, expect=202)
|
||||||
# with self.current_user(self.super_django_user):
|
project_update = project.project_updates.order_by('-pk')[0]
|
||||||
# response = self.get(url, expect=200)
|
self.check_project_update(project, should_fail=None,
|
||||||
# self.assertTrue(response['can_update'])
|
project_update=project_update)
|
||||||
# with self.current_user(self.super_django_user):
|
# Verify response to ssh-agent prompt, did not accept password.
|
||||||
# response = self.post(url, {}, expect=202)
|
self.assertTrue('Bad passphrase' in project_update.result_stdout,
|
||||||
# project_update = project.project_updates.order_by('-pk')[0]
|
project_update.result_stdout)
|
||||||
# self.check_project_update(project, should_fail=None,
|
self.assertFalse('Identity added' in project_update.result_stdout,
|
||||||
# project_update=project_update)
|
project_update.result_stdout)
|
||||||
# # Verify response to ssh-agent prompt, did not accept password.
|
|
||||||
# self.assertTrue('Bad passphrase' in project_update.result_stdout,
|
|
||||||
# project_update.result_stdout)
|
|
||||||
# self.assertFalse('Identity added' in project_update.result_stdout,
|
|
||||||
# project_update.result_stdout)
|
|
||||||
# self.terminate_taskamanger()
|
|
||||||
# self.terminate_queue()
|
|
||||||
|
|
||||||
def create_local_git_repo(self):
|
def create_local_git_repo(self):
|
||||||
repo_dir = tempfile.mkdtemp()
|
repo_dir = tempfile.mkdtemp()
|
||||||
@ -1344,8 +1321,6 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
self.check_project_scm(project)
|
self.check_project_scm(project)
|
||||||
|
|
||||||
def test_git_project_via_ssh_loopback(self):
|
def test_git_project_via_ssh_loopback(self):
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
|
||||||
scm_username = getattr(settings, 'TEST_SSH_LOOPBACK_USERNAME', '')
|
scm_username = getattr(settings, 'TEST_SSH_LOOPBACK_USERNAME', '')
|
||||||
scm_password = getattr(settings, 'TEST_SSH_LOOPBACK_PASSWORD', '')
|
scm_password = getattr(settings, 'TEST_SSH_LOOPBACK_PASSWORD', '')
|
||||||
if not all([scm_username, scm_password]):
|
if not all([scm_username, scm_password]):
|
||||||
@ -1360,12 +1335,8 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
scm_password=scm_password,
|
scm_password=scm_password,
|
||||||
)
|
)
|
||||||
self.check_project_scm(project)
|
self.check_project_scm(project)
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.termiante_queue()
|
|
||||||
|
|
||||||
def test_public_hg_project_over_https(self):
|
def test_public_hg_project_over_https(self):
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
|
||||||
scm_url = getattr(settings, 'TEST_HG_PUBLIC_HTTPS',
|
scm_url = getattr(settings, 'TEST_HG_PUBLIC_HTTPS',
|
||||||
'https://bitbucket.org/cchurch/django-hotrunner')
|
'https://bitbucket.org/cchurch/django-hotrunner')
|
||||||
if not all([scm_url]):
|
if not all([scm_url]):
|
||||||
@ -1389,12 +1360,8 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
scm_password=scm_password,
|
scm_password=scm_password,
|
||||||
)
|
)
|
||||||
self.check_project_update(project2)
|
self.check_project_update(project2)
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.terminate_queue()
|
|
||||||
|
|
||||||
def test_private_hg_project_over_https(self):
|
def test_private_hg_project_over_https(self):
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
|
||||||
scm_url = getattr(settings, 'TEST_HG_PRIVATE_HTTPS', '')
|
scm_url = getattr(settings, 'TEST_HG_PRIVATE_HTTPS', '')
|
||||||
scm_username = getattr(settings, 'TEST_HG_USERNAME', '')
|
scm_username = getattr(settings, 'TEST_HG_USERNAME', '')
|
||||||
scm_password = getattr(settings, 'TEST_HG_PASSWORD', '')
|
scm_password = getattr(settings, 'TEST_HG_PASSWORD', '')
|
||||||
@ -1408,12 +1375,8 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
scm_password=scm_password,
|
scm_password=scm_password,
|
||||||
)
|
)
|
||||||
self.check_project_scm(project)
|
self.check_project_scm(project)
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.terminate_queue()
|
|
||||||
|
|
||||||
def test_private_hg_project_over_ssh(self):
|
def test_private_hg_project_over_ssh(self):
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
|
||||||
scm_url = getattr(settings, 'TEST_HG_PRIVATE_SSH', '')
|
scm_url = getattr(settings, 'TEST_HG_PRIVATE_SSH', '')
|
||||||
scm_key_data = getattr(settings, 'TEST_HG_KEY_DATA', '')
|
scm_key_data = getattr(settings, 'TEST_HG_KEY_DATA', '')
|
||||||
if not all([scm_url, scm_key_data]):
|
if not all([scm_url, scm_key_data]):
|
||||||
@ -1426,8 +1389,6 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
)
|
)
|
||||||
self.check_project_scm(project)
|
self.check_project_scm(project)
|
||||||
# hg doesn't support password for ssh:// urls.
|
# hg doesn't support password for ssh:// urls.
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.terminate_queue()
|
|
||||||
|
|
||||||
def create_local_hg_repo(self):
|
def create_local_hg_repo(self):
|
||||||
repo_dir = tempfile.mkdtemp()
|
repo_dir = tempfile.mkdtemp()
|
||||||
@ -1472,8 +1433,6 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
self.check_project_scm(project)
|
self.check_project_scm(project)
|
||||||
|
|
||||||
def test_public_svn_project_over_https(self):
|
def test_public_svn_project_over_https(self):
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
|
||||||
scm_url = getattr(settings, 'TEST_SVN_PUBLIC_HTTPS',
|
scm_url = getattr(settings, 'TEST_SVN_PUBLIC_HTTPS',
|
||||||
'https://github.com/ansible/ansible.github.com')
|
'https://github.com/ansible/ansible.github.com')
|
||||||
if not all([scm_url]):
|
if not all([scm_url]):
|
||||||
@ -1484,12 +1443,8 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
scm_url=scm_url,
|
scm_url=scm_url,
|
||||||
)
|
)
|
||||||
self.check_project_scm(project)
|
self.check_project_scm(project)
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.terminate_queue()
|
|
||||||
|
|
||||||
def test_private_svn_project_over_https(self):
|
def test_private_svn_project_over_https(self):
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
|
||||||
scm_url = getattr(settings, 'TEST_SVN_PRIVATE_HTTPS', '')
|
scm_url = getattr(settings, 'TEST_SVN_PRIVATE_HTTPS', '')
|
||||||
scm_username = getattr(settings, 'TEST_SVN_USERNAME', '')
|
scm_username = getattr(settings, 'TEST_SVN_USERNAME', '')
|
||||||
scm_password = getattr(settings, 'TEST_SVN_PASSWORD', '')
|
scm_password = getattr(settings, 'TEST_SVN_PASSWORD', '')
|
||||||
@ -1503,8 +1458,6 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
scm_password=scm_password,
|
scm_password=scm_password,
|
||||||
)
|
)
|
||||||
self.check_project_scm(project)
|
self.check_project_scm(project)
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.terminate_queue()
|
|
||||||
|
|
||||||
def create_local_svn_repo(self):
|
def create_local_svn_repo(self):
|
||||||
repo_dir = tempfile.mkdtemp()
|
repo_dir = tempfile.mkdtemp()
|
||||||
@ -1533,8 +1486,6 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
self.check_project_scm(project)
|
self.check_project_scm(project)
|
||||||
|
|
||||||
def test_svn_project_via_ssh_loopback(self):
|
def test_svn_project_via_ssh_loopback(self):
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
|
||||||
scm_username = getattr(settings, 'TEST_SSH_LOOPBACK_USERNAME', '')
|
scm_username = getattr(settings, 'TEST_SSH_LOOPBACK_USERNAME', '')
|
||||||
scm_password = getattr(settings, 'TEST_SSH_LOOPBACK_PASSWORD', '')
|
scm_password = getattr(settings, 'TEST_SSH_LOOPBACK_PASSWORD', '')
|
||||||
if not all([scm_username, scm_password]):
|
if not all([scm_username, scm_password]):
|
||||||
@ -1549,8 +1500,6 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
scm_password=scm_password,
|
scm_password=scm_password,
|
||||||
)
|
)
|
||||||
self.check_project_scm(project)
|
self.check_project_scm(project)
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.terminate_queue()
|
|
||||||
|
|
||||||
def create_test_job_template(self, **kwargs):
|
def create_test_job_template(self, **kwargs):
|
||||||
opts = {
|
opts = {
|
||||||
@ -1626,10 +1575,7 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
# self.assertTrue(job.status in ('successful', 'failed'))
|
# self.assertTrue(job.status in ('successful', 'failed'))
|
||||||
# self.assertEqual(self.project.project_updates.count(), 3)
|
# self.assertEqual(self.project.project_updates.count(), 3)
|
||||||
|
|
||||||
@override_settings(IGNORE_CELERY_INSPECTOR=True)
|
|
||||||
def test_update_on_launch_with_project_passwords(self):
|
def test_update_on_launch_with_project_passwords(self):
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
|
||||||
scm_url = getattr(settings, 'TEST_GIT_PRIVATE_HTTPS', '')
|
scm_url = getattr(settings, 'TEST_GIT_PRIVATE_HTTPS', '')
|
||||||
scm_username = getattr(settings, 'TEST_GIT_USERNAME', '')
|
scm_username = getattr(settings, 'TEST_GIT_USERNAME', '')
|
||||||
scm_password = getattr(settings, 'TEST_GIT_PASSWORD', '')
|
scm_password = getattr(settings, 'TEST_GIT_PASSWORD', '')
|
||||||
@ -1682,5 +1628,3 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
#self.assertEqual(job.status, 'error',
|
#self.assertEqual(job.status, 'error',
|
||||||
# '\n'.join([job.result_stdout, job.result_traceback]))
|
# '\n'.join([job.result_stdout, job.result_traceback]))
|
||||||
self.assertEqual(self.project.project_updates.count(), 4)
|
self.assertEqual(self.project.project_updates.count(), 4)
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.terminate_queue()
|
|
||||||
|
@ -178,7 +178,6 @@ class RunJobTest(BaseCeleryTest):
|
|||||||
self.credential = None
|
self.credential = None
|
||||||
self.cloud_credential = None
|
self.cloud_credential = None
|
||||||
settings.INTERNAL_API_URL = self.live_server_url
|
settings.INTERNAL_API_URL = self.live_server_url
|
||||||
self.start_taskmanager(settings.TASK_COMMAND_PORT)
|
|
||||||
if settings.CALLBACK_CONSUMER_PORT:
|
if settings.CALLBACK_CONSUMER_PORT:
|
||||||
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
self.start_queue(settings.CALLBACK_CONSUMER_PORT, settings.CALLBACK_QUEUE_PORT)
|
||||||
|
|
||||||
@ -186,7 +185,6 @@ class RunJobTest(BaseCeleryTest):
|
|||||||
super(RunJobTest, self).tearDown()
|
super(RunJobTest, self).tearDown()
|
||||||
if self.test_project_path:
|
if self.test_project_path:
|
||||||
shutil.rmtree(self.test_project_path, True)
|
shutil.rmtree(self.test_project_path, True)
|
||||||
self.terminate_taskmanager()
|
|
||||||
self.terminate_queue()
|
self.terminate_queue()
|
||||||
|
|
||||||
def create_test_credential(self, **kwargs):
|
def create_test_credential(self, **kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user