Sha256: c4478596ce8e0344a48f18dcad17d21720cb66d677179b89cb7b9c51ac1dbf16

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 subnet" do
    @conn.bmc.lan.subnet.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.set_gateway(gw).should_not be nil
  end

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

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


end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubyipmi-0.3.3 spec/lan_spec.rb
rubyipmi-0.3.2 spec/lan_spec.rb
rubyipmi-0.3.1 spec/lan_spec.rb
rubyipmi-0.3.0 spec/lan_spec.rb