Skip to content

Commit

Permalink
Merge pull request #272 from shaffan-chaudhry-confiz/release/0.2.6
Browse files Browse the repository at this point in the history
Updated gem version and changelog | fixed broken NIC unit tests.
  • Loading branch information
Shaffan Chaudhry authored Jan 30, 2017
2 parents ac2bcf7 + 70f5051 commit 671b61e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 0.2.6

**Fixed:**
- Compute Service - storage_account_name attribute issue in server model
- Network Service - Attaching NSG issue while creating NIC

**Removed:**
- Dependency on nokogiri

## 0.2.5

**Fixed:**
Expand Down
2 changes: 1 addition & 1 deletion lib/fog/azurerm/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Fog
module AzureRM
VERSION = '0.2.5'.freeze
VERSION = '0.2.6'.freeze
end
end
8 changes: 4 additions & 4 deletions test/requests/network/test_create_network_interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ def setup
def test_create_network_interface_success
mocked_response = ApiStub::Requests::Network::NetworkInterface.create_network_interface_response(@network_client)
@network_interfaces.stub :create_or_update, mocked_response do
assert_equal @service.create_or_update_network_interface('fog-test-rg', 'fog-test-network-interface', 'West US', 'fog-test-subnet-id', 'fog-test-ip-address-id', 'fog-test-ip-configuration', 'Dynamic', '10.0.0.8', ['id-1', 'id-2'], ['id-1', 'id-2']), mocked_response
assert_equal @service.create_or_update_network_interface('fog-test-rg', 'fog-test-network-interface', 'West US', 'fog-test-subnet-id', 'fog-test-ip-address-id', 'fog-test-nsg-id', 'fog-test-ip-configuration', 'Dynamic', '10.0.0.8', ['id-1', 'id-2'], ['id-1', 'id-2']), mocked_response
end
end

def test_create_network_interface_without_public_ip_success
mocked_response = ApiStub::Requests::Network::NetworkInterface.create_network_interface_response(@network_client)
@network_interfaces.stub :create_or_update, mocked_response do
assert_equal @service.create_or_update_network_interface('fog-test-rg', 'fog-test-network-interface', 'West US', 'fog-test-subnet-id', nil, 'fog-test-ip-configuration', 'Dynamic', '10.0.0.8', ['id-1', 'id-2'], ['id-1', 'id-2']), mocked_response
assert_equal @service.create_or_update_network_interface('fog-test-rg', 'fog-test-network-interface', 'West US', 'fog-test-subnet-id', nil, 'fog-test-nsg-id', 'fog-test-ip-configuration', 'Dynamic', '10.0.0.8', ['id-1', 'id-2'], ['id-1', 'id-2']), mocked_response
end
end

def test_create_network_interface_argument_error_failure
response = ApiStub::Requests::Network::NetworkInterface.create_network_interface_response(@network_client)
@network_interfaces.stub :create_or_update, response do
assert_raises ArgumentError do
@service.create_or_update_network_interface('fog-test-rg', 'fog-test-network-interface', 'West US', 'fog-test-subnet-id', 'fog-test-ip-address-id', 'fog-test-ip-configuration', ['id-1', 'id-2'], ['id-1', 'id-2'])
@service.create_or_update_network_interface('fog-test-rg', 'fog-test-network-interface', 'West US', 'fog-test-subnet-id', 'fog-test-ip-address-id', 'fog-test-nsg-id', 'fog-test-ip-configuration', ['id-1', 'id-2'], ['id-1', 'id-2'])
end
end
end
Expand All @@ -35,7 +35,7 @@ def test_create_network_interface_exception_failure
response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
@network_interfaces.stub :create_or_update, response do
assert_raises RuntimeError do
@service.create_or_update_network_interface('fog-test-rg', 'fog-test-network-interface', 'West US', 'fog-test-subnet-id', 'fog-test-ip-address-id', 'fog-test-ip-configuration', 'Dynamic', '10.0.0.8', ['id-1', 'id-2'], ['id-1', 'id-2'])
@service.create_or_update_network_interface('fog-test-rg', 'fog-test-network-interface', 'West US', 'fog-test-subnet-id', 'fog-test-ip-address-id', 'fog-test-nsg-id', 'fog-test-ip-configuration', 'Dynamic', '10.0.0.8', ['id-1', 'id-2'], ['id-1', 'id-2'])
end
end
end
Expand Down

0 comments on commit 671b61e

Please sign in to comment.