Sha256: a862cda3be2c380607e4763d28381cae930042df2b73da03a3af89cbdf99be0b
Contents?: true
Size: 1.75 KB
Versions: 5
Compression:
Stored size: 1.75 KB
Contents
#------------------------------------------------------------------------- # Copyright 2013 Microsoft Open Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #-------------------------------------------------------------------------- require 'integration/test_helper' describe Azure::VirtualNetworkManagement::VirtualNetwork do subject { Azure::VirtualNetworkManagementService.new } let(:affinity_group_name) { 'my-affinity-group' } let(:geo_location) { 'West US' } let(:vnet_name) { 'vnet-integration-test' } before do Azure::Loggerx.expects(:puts).returns(nil).at_least(0) address_space = %w(172.16.0.0/12 10.0.0.0/8 192.168.0.0/24) unless subject.list_virtual_networks.map(&:name).include?(vnet_name) subject.set_network_configuration( vnet_name, geo_location, address_space ) end end describe '#list_virtual_networks' do it 'Gets a list of virtual networks for the current subscription.' do virtual_networks = subject.list_virtual_networks virtual_networks.wont_be_nil virtual_networks.must_be_kind_of Array virtual_networks.first.must_be_kind_of( Azure::VirtualNetworkManagement::VirtualNetwork ) assert_operator virtual_networks.size, :>=, 1 end end end
Version data entries
5 entries across 5 versions & 2 rubygems