Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
okeanos-LoD
Commits
a253f9ba
Commit
a253f9ba
authored
Apr 26, 2016
by
Georgios Ouzounis
Browse files
Remove deprecated test for lambda instance destroy API call
parent
1804473a
Changes
1
Show whitespace changes
Inline
Side-by-side
webapp/tests/test_lambda_instances.py
View file @
a253f9ba
...
@@ -812,36 +812,6 @@ class LambdaInstanceDestroy(APITestCase):
...
@@ -812,36 +812,6 @@ class LambdaInstanceDestroy(APITestCase):
CustomAlreadyDoneError
.
messages
[
'lambda_instance_already'
].
CustomAlreadyDoneError
.
messages
[
'lambda_instance_already'
].
format
(
state
=
"destroyed"
))
format
(
state
=
"destroyed"
))
# Test for destroying a lambda instance when its status is CLUSTER_FAILED.
def
test_cluster_failed_status
(
self
):
# Change the status of the lambda instance to CLUSTER_FAILED.
self
.
lambda_instance
.
status
=
LambdaInstance
.
CLUSTER_FAILED
self
.
lambda_instance
.
save
()
# Make a request to destroy the lambda instance.
response
=
self
.
client
.
delete
(
"/api/lambda-instances/{id}/"
.
format
(
id
=
self
.
lambda_instance_uuid
))
# Assert the response code.
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_409_CONFLICT
)
# Assert the structure of the response.
self
.
assertIn
(
'errors'
,
response
.
data
)
self
.
assertEqual
(
len
(
response
.
data
[
'errors'
]),
1
)
for
error
in
response
.
data
[
'errors'
]:
self
.
assertIn
(
'status'
,
error
)
self
.
assertIn
(
'detail'
,
error
)
# Assert the contents of the response.
self
.
assertEqual
(
response
.
data
[
'errors'
][
0
][
'status'
],
status
.
HTTP_409_CONFLICT
)
self
.
assertEqual
(
response
.
data
[
'errors'
][
0
][
'detail'
],
CustomCantDoError
.
messages
[
'cant_do'
].
format
(
action
=
"destroy"
,
object
=
"a lambda instance"
,
status
=
"CLUSTER_FAILED"
))
class
TestLambdaInstanceStart
(
APITestCase
):
class
TestLambdaInstanceStart
(
APITestCase
):
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment