Sha256: 9e1d5a5cd6a37baf0e5c63318d24804cc687ba3ef74e3a64d39e45b449f7f9b7

Contents?: true

Size: 1.07 KB

Versions: 22

Compression:

Stored size: 1.07 KB

Contents

Shindo.tests('Fog::Google[:sql] | ssl_certs model', ['google']) do
  @instance = Fog::Google[:sql].instances.create(:instance => Fog::Mock.random_letters(16), :tier => 'D1')
  @instance.wait_for { ready? }
  @ssl_cert = Fog::Google[:sql].ssl_certs.create(:instance => @instance.instance,
                                                 :common_name => Fog::Mock.random_letters(16))
  @ssl_certs = Fog::Google[:sql].ssl_certs

  tests('success') do

    tests('#all').succeeds do
      @ssl_certs.all(@instance.instance)
    end

    tests('#get').succeeds do
      @ssl_certs.get(@instance.instance, @ssl_cert.sha1_fingerprint)
    end

  end

  tests('failure') do

    tests('#all').returns([]) do
      @ssl_certs.all(Fog::Mock.random_letters_and_numbers(16))
    end

    tests('#get').returns(nil) do
      @ssl_certs.get(@instance.instance, Fog::Mock.random_letters_and_numbers(16))
    end

    tests('#get').returns(nil) do
      @ssl_certs.get(Fog::Mock.random_letters_and_numbers(16), Fog::Mock.random_letters_and_numbers(16))
    end

  end

  @ssl_cert.destroy
  @instance.destroy

end

Version data entries

22 entries across 20 versions & 5 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-google-0.1.0/tests/models/sql/ssl_certs_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-google-0.1.0/tests/models/sql/ssl_certs_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-google-0.1.0/tests/models/sql/ssl_certs_tests.rb
fog-google-0.1.3 tests/models/sql/ssl_certs_tests.rb
fog-google-0.1.2 tests/models/sql/ssl_certs_tests.rb
fog-google-0.1.1 tests/models/sql/ssl_certs_tests.rb
fog-google-0.1.0 tests/models/sql/ssl_certs_tests.rb
fog-google-0.0.9 tests/models/sql/ssl_certs_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-google-0.0.7/tests/models/sql/ssl_certs_tests.rb
fog-google-0.0.7 tests/models/sql/ssl_certs_tests.rb
fog-google-0.0.6 tests/models/sql/ssl_certs_tests.rb
fog-google-0.0.5 tests/models/sql/ssl_certs_tests.rb
fog-google-0.0.4 tests/models/sql/ssl_certs_tests.rb
fog-google-0.0.3 tests/models/sql/ssl_certs_tests.rb
fog-google-0.0.2 tests/models/sql/ssl_certs_tests.rb
fog-1.29.0 tests/google/models/sql/ssl_certs_tests.rb
fog-1.28.0 tests/google/models/sql/ssl_certs_tests.rb
fog-1.27.0 tests/google/models/sql/ssl_certs_tests.rb
fog-1.26.0 tests/google/models/sql/ssl_certs_tests.rb
fog-1.25.0 tests/google/models/sql/ssl_certs_tests.rb