File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
lib/fog/compute/google/models Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 9
9
next_page_token = nil
10
10
loop do
11
11
data = service . list_snapshots ( nil , next_page_token )
12
- items . concat ( data . body [ "items" ] )
12
+ items . concat ( data . body [ "items" ] ) unless data . body [ "items" ] . nil?
13
13
next_page_token = data . body [ "nextPageToken" ]
14
14
break if next_page_token . nil? || next_page_token . empty?
15
15
end
Original file line number Diff line number Diff line change
1
+ require "helpers/integration_test_helper"
2
+ require "securerandom"
3
+ require "base64"
4
+
5
+ class TestComputeSnapshots < FogIntegrationTest
6
+ def setup
7
+ @client = Fog ::Compute ::Google . new
8
+ # Ensure any resources we create with test prefixes are removed
9
+ Minitest . after_run do
10
+ delete_test_resources
11
+ end
12
+ end
13
+
14
+ def test_list_empty_snapshots
15
+ assert_empty @client . snapshots . all
16
+ end
17
+
18
+ def delete_test_resources
19
+ # nothing to do
20
+ end
21
+ end
You can’t perform that action at this time.
0 commit comments