File: sql_instances_factory.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 (19 lines) | stat: -rw-r--r-- 485 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require "integration/factories/collection_factory"

class SqlInstancesFactory < CollectionFactory
  def initialize(example)
    super(Fog::Google[:sql].instances, example)
  end

  def cleanup
    super
  end

  def params
    # Name has a time suffix due to SQL resources API objects having
    # a _very_ long life on the backend (n(days)) after deletion.
    { :name => "#{resource_name}-#{Time.now.to_i}",
      :region => TEST_SQL_REGION,
      :tier => TEST_SQL_TIER }
  end
end