-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force the hash returned by Fog::Compute::Google::Disks#get to contain…
… a :users key (fixes #611)
- Loading branch information
Rob Chekaluk
committed
Nov 10, 2023
1 parent
2081621
commit 0ad3fdd
Showing
3 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
require "helpers/test_helper" | ||
|
||
class UnitTestDisk < Minitest::Test | ||
def setup | ||
Fog.mock! | ||
@client = Fog::Compute.new(provider: "google", | ||
google_project: "foo") | ||
end | ||
|
||
def teardown | ||
Fog.unmock! | ||
end | ||
|
||
def test_new_disk | ||
disk = Fog::Compute::Google::Disk.new( | ||
:name => "fog-1", | ||
:size_gb => 10, | ||
:zone => "us-central1-a", | ||
:source_image => "debian-7-wheezy-v20131120" | ||
) | ||
assert_equal("fog-1", disk.name, "Fog::Compute::Google::Disk name is incorrect: #{disk.name}") | ||
assert_equal(10, disk.size_gb, "Fog::Compute::Google::Disk size_gb is incorrect: #{disk.size_gb}") | ||
assert_equal("us-central1-a", disk.zone, "Fog::Compute::Google::Disk zone is incorrect: #{disk.zone}") | ||
assert_equal("debian-7-wheezy-v20131120", disk.source_image, "Fog::Compute::Google::Disk source_image is incorrect: #{disk.source_image}") | ||
end | ||
end |