Skip to content

Commit 2e7637a

Browse files
committed
Add mock-data for pool requests
1 parent 3741a85 commit 2e7637a

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

lib/fog/proxmox/compute/requests/next_vmid.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ def next_vmid(options = {})
3535

3636
# class Mock next_vmid collection
3737
class Mock
38-
def next_vmid; end
38+
def next_vmid(options = {})
39+
101
40+
end
3941
end
4042
end
4143
end

lib/fog/proxmox/identity/requests/get_pool.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ def get_pool(poolid)
3434

3535
# class Mock get_pool collection
3636
class Mock
37-
def get_pool(poolid); end
37+
def get_pool(poolid)
38+
{
39+
'members' => [],
40+
'comment' => 'This pool is just for testing'
41+
}
42+
end
3843
end
3944
end
4045
end

lib/fog/proxmox/identity/requests/list_pools.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ def list_pools
3434

3535
# class Mock list_pools request
3636
class Mock
37-
def list_pools; end
37+
def list_pools
38+
[
39+
{
40+
'poolid' => 'TestPool',
41+
'comment' => 'This pool is just for testing'
42+
}
43+
]
44+
end
3845
end
3946
end
4047
end

0 commit comments

Comments
 (0)