Sha256: 441d020a7dbeb9d8841c8e02b0c426b847710d4f2757802f28532659531e60d1
Contents?: true
Size: 723 Bytes
Versions: 3
Compression:
Stored size: 723 Bytes
Contents
class StubDatabase < OpenStruct def provisioned? status == 'provisioned' end end Fabricator(:database, from: :stub_database) do transient :service type 'postgresql' handle do |attrs| Fabricate.sequence(:database) { |i| "#{attrs[:type]}-#{i}" } end passphrase 'password' status 'provisioned' connection_url 'postgresql://aptible:password@10.252.1.125:49158/db' account database_image disk { Fabricate(:database_disk) } service { nil } backups { [] } database_credentials { [] } after_create do |database, transients| database.account.databases << database database.service = transients[:service] || Fabricate( :service, app: nil, database: database ) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
aptible-cli-0.18.0 | spec/fabricators/database_fabricator.rb |
aptible-cli-0.17.2 | spec/fabricators/database_fabricator.rb |
aptible-cli-0.17.1 | spec/fabricators/database_fabricator.rb |