Sha256: bab9646e99d4e075fdb53ba1bbabde371116f0b3be46026a856ef735d742f085

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 KB

Contents

if ENV['INTEGRATION']
  describe 'Infoblox::ZoneAuth' do
    describe '.find' do
      it 'should find' do
        each_version do 
          next if Infoblox.wapi_version < '1.1'
          # the empty result will be [], so nil is bad. 
          expect(Infoblox::ZoneAuth.find(connection, :_max_results => 1)).to_not be_nil
        end
      end
      
      it 'should create, update, and destroy' do
        failure = false
        each_version do
          next if Infoblox.wapi_version < '1.1'
          @zone_auth = Infoblox::ZoneAuth.new(:connection => connection)
          begin
            @zone_auth.fqdn = "poc-infobloxgem-test1.ep.gdi"
            @zone_auth.post
            @zone_auth = Infoblox::ZoneAuth.find(connection, {"fqdn" => "poc-infobloxgem-test1.ep.gdi"}).first
            @zone_auth.comment = "Test zone auth. Delete me"
            @zone_auth.put
          rescue Exception => e
            puts e
            failure = true
          ensure
            @zone_auth.delete
          end      
        end
        fail if failure
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
infoblox-1.0.0 spec/integration/zone_auth_spec.rb
infoblox-0.5.3 spec/integration/zone_auth_spec.rb
infoblox-0.5.2 spec/integration/zone_auth_spec.rb
infoblox-0.5.1 spec/integration/zone_auth_spec.rb