File: test_client_options.rb

package info (click to toggle)
ruby-fog-google 1.19.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,568 kB
  • sloc: ruby: 16,775; makefile: 3
file content (12 lines) | stat: -rw-r--r-- 473 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
require "helpers/integration_test_helper"

class TestComputeClient < FogIntegrationTest
  def test_client_options
    # XXX This is a very rudimentary test checking that proxy option is applied
    client_options = { proxy_url: "https://user:password@host:8080" }
    connection = Fog::Compute::Google.new(google_client_options: client_options)

    err = assert_raises(ArgumentError) { connection.servers.all }
    assert_match(/unsupported proxy/, err.message)
  end
end