Sha256: 43742544e439d9665fd727398eefb4dfbf3b371b358d9e7a10c0c1d862fc1d8c

Contents?: true

Size: 540 Bytes

Versions: 8

Compression:

Stored size: 540 Bytes

Contents

require "integration/factories/collection_factory"
require "integration/factories/sql_v1_instances_factory"

class SqlV1UsersFactory < CollectionFactory
  def initialize(example)
    @instances = SqlV1InstancesFactory.new(example)
    super(Fog::Google[:sql].users, example)
  end

  def cleanup
    # Users will be cleaned up with the test instance.
    @instances.cleanup
  end

  def params
    # Username should not be longer than 16 characters
    { :name => resource_name[0..15],
      :instance => @instances.create.name }
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fog-google-1.9.1 test/integration/factories/sql_v1_users_factory.rb
fog-google-1.9.0 test/integration/factories/sql_v1_users_factory.rb
fog-google-1.8.2 test/integration/factories/sql_v1_users_factory.rb
fog-google-1.8.1 test/integration/factories/sql_v1_users_factory.rb
fog-google-1.8.0 test/integration/factories/sql_v1_users_factory.rb
fog-google-1.7.1 test/integration/factories/sql_v1_users_factory.rb
fog-google-1.7.0 test/integration/factories/sql_v1_users_factory.rb
fog-google-1.6.0 test/integration/factories/sql_v1_users_factory.rb