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

add aborted state on instance #657

Merged
merged 1 commit into from
Sep 6, 2023
Merged

Conversation

Sispheor
Copy link
Contributor

@Sispheor Sispheor commented Sep 6, 2023

No description provided.

@@ -357,7 +357,7 @@ def test_check_job_status_failed(self):
def test_cancel(self):
self.assertTrue(Instance.objects.filter(id=self.test_instance.id).exists())
self.test_request.cancel()
self.assertFalse(Instance.objects.filter(id=self.test_instance.id).exists())
self.test_request.instance.state = InstanceState.ABORTED
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertEquals?

@@ -31,7 +31,7 @@ def test_request_cancel(self):
url = reverse('service_catalog:request_cancel', kwargs=args)
response = self.client.post(url)
self.assertEqual(302, response.status_code)
self.assertEqual(0, Request.objects.filter(id=self.test_request.id).count())
self.test_request.instance.state = InstanceState.ABORTED
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assert?

@@ -19,7 +19,7 @@ def _assert_can_cancel(self):
self.assertEqual(200, response.status_code)
response = self.client.post(url)
self.assertEqual(302, response.status_code)
self.assertEqual(0, Request.objects.filter(id=self.test_request.id).count())
self.test_request.instance.state = InstanceState.ABORTED
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assert

@@ -53,4 +53,4 @@ def test_admin_can_cancel_from_admin_view(self):
url = reverse('service_catalog:request_cancel', kwargs=args)
response = self.client.post(url)
self.assertEqual(302, response.status_code)
self.assertEqual(0, Request.objects.filter(id=self.test_request.id).count())
self.test_request.instance.state = InstanceState.ABORTED
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assert

@EliasBoulharts EliasBoulharts merged commit 9bd1145 into HewlettPackard:dev Sep 6, 2023
@Sispheor Sispheor deleted the aborted branch September 6, 2023 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants