Sha256: 50ce094a09f9393fd3ee9010ff3c1305ac20747eb19f56639d8ab3a348960340

Contents?: true

Size: 1.27 KB

Versions: 4

Compression:

Stored size: 1.27 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe "Lan" do

  before :each do
            user = ENV["ipmiuser"]
            pass = ENV["ipmipass"]
            host = ENV["ipmihost"]
            provider = ENV["ipmiprovider"]
            @conn = Rubyipmi.connect(user, pass, host, provider)



  end

  it "get ip address" do
      @conn.bmc.lan.ip.should_not be nil
  end

  it "get netmask" do
    @conn.bmc.lan.netmask.should_not be nil
  end

  it "get gateway address" do
    @conn.bmc.lan.gateway.should_not be nil
  end

  it "get mac address" do
    @conn.bmc.lan.mac.should_not be nil
  end

  it "get static or dhcp" do
    @conn.bmc.lan.dhcp?.should_not be nil
  end

  it "static should be opposite of dhcp" do
    @conn.bmc.lan.dhcp?.should_not == @conn.bmc.lan.static?
  end

  it "dhcp should be opposite of static" do
      @conn.bmc.lan.static?.should_not == @conn.bmc.lan.dhcp?
  end


  it "should set gateway address" do
    gw = @conn.bmc.lan.gateway
    (@conn.bmc.lan.gateway = gw).should_not be nil
  end

  it "should set netmask" do
    netmask = @conn.bmc.lan.netmask
    (@conn.bmc.lan.netmask = netmask).should_not be nil
  end

  it "should set ip address" do
    ip = @conn.bmc.lan.ip
    (@conn.bmc.lan.ip = ip).should_not be nil
  end


end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubyipmi-0.6.0 spec/lan_spec.rb
rubyipmi-0.5.1 spec/lan_spec.rb
rubyipmi-0.5.0 spec/lan_spec.rb
rubyipmi-0.4.0 spec/lan_spec.rb