Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
105
Merge Requests
105
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
b18b8480
Commit
b18b8480
authored
Jan 21, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/kvm/test: store snapshots when custom tearDown fail
This shall help debugging test failures
parent
2cd53dca
Pipeline
#19403
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
software/kvm/test/test.py
software/kvm/test/test.py
+21
-3
No files found.
software/kvm/test/test.py
View file @
b18b8480
...
@@ -249,7 +249,13 @@ class TestMemoryManagement(InstanceTestCase, KvmMixin):
...
@@ -249,7 +249,13 @@ class TestMemoryManagement(InstanceTestCase, KvmMixin):
def
tearDown
(
self
):
def
tearDown
(
self
):
self
.
rerequestInstance
({})
self
.
rerequestInstance
({})
self
.
slap
.
waitForInstance
(
max_retry
=
10
)
try
:
self
.
slap
.
waitForInstance
(
max_retry
=
10
)
except
SlapOSNodeCommandError
:
self
.
logger
.
exception
(
'Error waiting for instance after rerequesting'
)
self
.
_storePartitionSnapshot
(
'{}.tearDown rerequest'
.
format
(
self
.
id
()))
raise
super
(
TestMemoryManagement
,
self
).
tearDown
()
def
test_enable_device_hotplug
(
self
):
def
test_enable_device_hotplug
(
self
):
def
getHotpluggedCpuRamValue
():
def
getHotpluggedCpuRamValue
():
...
@@ -835,10 +841,22 @@ class TestBootImageUrlList(InstanceTestCase, FakeImageServerMixin):
...
@@ -835,10 +841,22 @@ class TestBootImageUrlList(InstanceTestCase, FakeImageServerMixin):
# clean up the instance for other tests
# clean up the instance for other tests
# 1st remove all images...
# 1st remove all images...
self
.
rerequestInstance
({
self
.
key
:
''
})
self
.
rerequestInstance
({
self
.
key
:
''
})
self
.
slap
.
waitForInstance
(
max_retry
=
10
)
try
:
self
.
slap
.
waitForInstance
(
max_retry
=
10
)
except
SlapOSNodeCommandError
:
self
.
logger
.
exception
(
'Error waiting for instance after removing images'
)
self
.
_storePartitionSnapshot
(
'{}.tearDown remove all images'
.
format
(
self
.
id
()))
raise
# 2nd ...move instance to "default" state
# 2nd ...move instance to "default" state
self
.
rerequestInstance
({})
self
.
rerequestInstance
({})
self
.
slap
.
waitForInstance
(
max_retry
=
10
)
try
:
self
.
slap
.
waitForInstance
(
max_retry
=
10
)
except
SlapOSNodeCommandError
:
self
.
logger
.
exception
(
'Error waiting for instance after moving to "default" state'
)
self
.
_storePartitionSnapshot
(
'{}.tearDown move to default state'
.
format
(
self
.
id
()))
raise
self
.
stopImageHttpServer
()
self
.
stopImageHttpServer
()
super
(
InstanceTestCase
,
self
).
tearDown
()
super
(
InstanceTestCase
,
self
).
tearDown
()
...
...
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