spec/spec_helper.rb in rbovirt-0.0.29 vs spec/spec_helper.rb in rbovirt-0.0.30

- old
+ new

@@ -17,12 +17,12 @@ http.request(request).body end def setup_client(options = {}) user, password, url, datacenter = endpoint - opts = { - :ca_cert_file => "#{File.dirname(__FILE__)}/ca_cert.pem" - } + cert = ca_cert(url) + store = OpenSSL::X509::Store.new().add_cert(OpenSSL::X509::Certificate.new(cert)) + opts = { :ca_cert_store => store } @client = ::OVIRT::Client.new(user, password, url, opts) datacenter_id = @client.datacenters.find{|x| x.name == datacenter}.id rescue raise("Cannot find datacenter #{datacenter}") opts.merge!(:datacenter_id => datacenter_id) opts.merge! options @client = ::OVIRT::Client.new(user, password, url, opts)