tests/xenserver/models/compute/server_tests.rb in fog-1.12.1 vs tests/xenserver/models/compute/server_tests.rb in fog-1.13.0
- old
+ new
@@ -58,11 +58,12 @@
:hvm_boot_params,
:pci_bus,
:pv_kernel,
:pv_ramdisk,
:pv_legacy_args,
- :pv_bootloader_args
+ :pv_bootloader_args,
+ :snapshots
]
tests("The server model should respond to") do
attributes.each do |attribute|
test("#{attribute}") { server.respond_to? attribute }
end
@@ -153,9 +154,18 @@
test("set attribute PV_bootloader to supergrub") do
server.set_attribute 'PV_bootloader', 'supergrub'
server.reload
server.pv_bootloader == 'supergrub'
+ end
+
+ tests("Creating a snapshot") do
+ snap_ref = server.snapshot('newsnapshot')
+ tests("it should create a snapshot") do
+ snap_ref = server.snapshot('newsnapshot')
+ servers.get(snap_ref).reference == snap_ref
+ end
+ test("and destroy it afterwards") { servers.get(snap_ref).destroy }
end
test("be able to be destroyed!") do
server.destroy
servers.get_by_name('fog-test-server-shindo') == nil