Sha256: 7996fe765f6a74fe16802b3123d19eabf65b829af0f06979d6e076c269d2b49e
Contents?: true
Size: 1.66 KB
Versions: 5
Compression:
Stored size: 1.66 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "rubyipmi" do before :each do @user = ENV["ipmiuser"] @pass = ENV["ipmipass"] @host = ENV["ipmihost"] @provider = ENV["ipmiprovider"] end it "creates a connection object" do conn = Rubyipmi.connect(@user, @pass, @host, @provider) conn.should_not be_nil end it "should test if a provider is present" do value = Rubyipmi.is_provider_installed?("ipmitool") value2 = Rubyipmi.is_provider_installed?("freeipmi") (value|value2).should_not be false end it "should create a connection object if freeipmi is present" do begin conn = Rubyipmi.connect(@user, @pass, @host, "freeipmi") conn.kind_of?(Rubyipmi::Freeipmi::Connection).should be_true rescue Exception => e e.message.match(/freeipmi\ is\ not\ installed/).should be_true puts "#{e.message}" end end it "should create a connection object if ipmitool is present" do begin conn = Rubyipmi.connect(@user, @pass, @host, "ipmitool") rescue Exception => e e.message.match(/ipmitool\ is\ not\ installed/).should be_true puts "#{e.message}" return true end conn.kind_of?(Rubyipmi::Ipmitool::Connection).should be_true end it "should not create a connection object if a provider is not present" do begin conn = Rubyipmi.connect(@user, @pass, @host, "bogus") rescue Exception => e e.message.match(/Invalid/).should be_true end end it "check to find any available installed providers" do Rubyipmi.providers_installed?.length.should be > 0 end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
rubyipmi-0.4.0 | spec/rubyipmi_spec.rb |
rubyipmi-0.3.3 | spec/rubyipmi_spec.rb |
rubyipmi-0.3.2 | spec/rubyipmi_spec.rb |
rubyipmi-0.3.1 | spec/rubyipmi_spec.rb |
rubyipmi-0.3.0 | spec/rubyipmi_spec.rb |