Skip to content

Commit 566c2c5

Browse files
committed
add suspend(), resume() tests
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
1 parent 381e131 commit 566c2c5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_vagrant.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,20 @@ def test_vm_lifecycle(vm_dir):
308308
assert v.NOT_CREATED == v.status()[0].state
309309

310310

311+
def test_vm_resumecycle(vm_dir):
312+
"""Test methods controlling the VM - up(), suspend(), resume()."""
313+
v = vagrant.Vagrant(vm_dir)
314+
315+
v.up()
316+
assert v.RUNNING == v.status()[0].state
317+
318+
v.suspend()
319+
assert v.SAVED == v.status()[0].state
320+
321+
v.resume()
322+
assert v.RUNNING == v.status()[0].state
323+
324+
311325
def test_valid_config(vm_dir):
312326
v = vagrant.Vagrant(vm_dir)
313327
v.up()

0 commit comments

Comments
 (0)