File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
test/integration/compute/core_compute Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -29,4 +29,25 @@ def test_get_as_configs
29
29
:type => "PERSISTENT" }
30
30
assert_equal ( example_with_params , config_with_params )
31
31
end
32
+
33
+ def test_create_snapshot
34
+ disk = @factory . create
35
+ disk . wait_for { ready? }
36
+
37
+ snapshot = disk . create_snapshot ( "fog-test-snapshot" )
38
+
39
+ assert ( snapshot . is_a? ( Fog ::Compute ::Google ::Snapshot ) ,
40
+ "Resulting snapshot should be a snapshot object." )
41
+
42
+ assert_raises ( ArgumentError ) { snapshot . set_labels ( [ "bar" , "test" ] ) }
43
+
44
+ snapshot . set_labels ( foo : "bar" , fog : "test" )
45
+
46
+ assert_equal ( snapshot . labels [ :foo ] , "bar" )
47
+ assert_equal ( snapshot . labels [ :fog ] , "test" )
48
+
49
+ # Clean up the snapshot
50
+ operation = snapshot . destroy
51
+ operation . wait_for { ready? }
52
+ end
32
53
end
You can’t perform that action at this time.
0 commit comments