Sha256: 96ab571344be26b57af2e846bfc64cd9111f8f3eaac958cba756209f963f2892

Contents?: true

Size: 1.64 KB

Versions: 22

Compression:

Stored size: 1.64 KB

Contents

Shindo.tests('Fog::Google[:sql] | instance model', ['google']) do
  @instances = Fog::Google[:sql].instances

  tests('success') do

    tests('#create').succeeds do
      @instance = @instances.create(:instance => Fog::Mock.random_letters(16), :tier => 'D1')
      @instance.wait_for { ready? }
    end

    tests('#update').succeeds do
      @instance.activation_policy = 'ALWAYS'
      @instance.update
      @instance.wait_for { ready? }
    end

    tests('#clone').succeeds do
      pending unless Fog.mocking? # Binary log must be activated
      instance_cloned_id = Fog::Mock.random_letters(16)
      @instance.clone(instance_cloned_id, :async => false)
      @instances.get(instance_cloned_id).destroy
    end

    tests('#export').succeeds do
      pending unless Fog.mocking? # We don't have access to a Google Cloud Storage bucket
      @instance.export("gs://#{Fog::Mock.random_letters_and_numbers(16)}/mysql-export", :async => false)
    end

    tests('#import').succeeds do
      pending unless Fog.mocking? # We don't have access to a Google Cloud Storage bucket
      @instance.import("gs://#{Fog::Mock.random_letters_and_numbers(16)}/mysql-export", :async => false)
    end

    tests('#ready?').succeeds do
      @instance.ready? == true
    end

    tests('#reset_ssl_config').succeeds do
      @instance.reset_ssl_config(:async => false)
    end

    tests('#restart').succeeds do
      @instance.restart(:async => false)
    end

    tests('#set_root_password').succeeds do
      @instance.set_root_password(Fog::Mock.random_letters_and_numbers(8), :async => false)
    end

    tests('#destroy').succeeds do
      @instance.destroy
    end

  end

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/instance_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-google-0.1.0/tests/models/sql/instance_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-google-0.1.0/tests/models/sql/instance_tests.rb
fog-google-0.1.3 tests/models/sql/instance_tests.rb
fog-google-0.1.2 tests/models/sql/instance_tests.rb
fog-google-0.1.1 tests/models/sql/instance_tests.rb
fog-google-0.1.0 tests/models/sql/instance_tests.rb
fog-google-0.0.9 tests/models/sql/instance_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-google-0.0.7/tests/models/sql/instance_tests.rb
fog-google-0.0.7 tests/models/sql/instance_tests.rb
fog-google-0.0.6 tests/models/sql/instance_tests.rb
fog-google-0.0.5 tests/models/sql/instance_tests.rb
fog-google-0.0.4 tests/models/sql/instance_tests.rb
fog-google-0.0.3 tests/models/sql/instance_tests.rb
fog-google-0.0.2 tests/models/sql/instance_tests.rb
fog-1.29.0 tests/google/models/sql/instance_tests.rb
fog-1.28.0 tests/google/models/sql/instance_tests.rb
fog-1.27.0 tests/google/models/sql/instance_tests.rb
fog-1.26.0 tests/google/models/sql/instance_tests.rb
fog-1.25.0 tests/google/models/sql/instance_tests.rb