Remove all fabricators

This commit is contained in:
Artur Beljajev 2017-10-28 21:36:46 +03:00
parent 9fd02c738f
commit 33772925b1
24 changed files with 0 additions and 303 deletions

View file

@ -1,6 +0,0 @@
Fabricator(:account) do
account_type { Account::CASH }
balance 0.0
currency 'EUR'
registrar
end

View file

@ -1,29 +0,0 @@
# currently identity code generation not implemented,
# thus default user is FI for a while
Fabricator(:admin_user) do
username 'gitlab'
password 'ghyt9e4fu'
password_confirmation 'ghyt9e4fu'
email { sequence(:email) { |i| "info#{i}@example.com" } }
country_code 'FI'
roles ['admin']
end
Fabricator(:ee_user, from: :admin_user) do
identity_code "45002036517"
country_code 'EE'
username 'user1'
password 'testtest'
password_confirmation 'testtest'
roles ['admin']
end
# Valid identity codes
# 48805195231
# 45002036517
# 47601126511
# 48802292754
# 45912080223
# 34406056538
# 39503140321
# 39507241618

View file

@ -1,14 +0,0 @@
# default fabricator should be reusable
Fabricator(:api_user) do
username { sequence(:username) { |i| "username#{i}" } }
password 'ghyt9e4fu'
identity_code '14212128025'
registrar
active true
roles ['super']
end
# use dedicated fabricator for fixed one
Fabricator(:gitlab_api_user, from: :api_user) do
username 'gitlab'
end

View file

@ -1,6 +0,0 @@
Fabricator(:bank_statement) do
bank_code { '767' }
iban { 'EE557700771000598731' }
queried_at { Time.zone.now }
bank_transactions(count: 2)
end

View file

@ -1,6 +0,0 @@
Fabricator(:bank_transaction) do
currency { 'EUR' }
sum { 100.0 }
description { 'Invoice no. 1' }
reference_no { 'RF2405752128' }
end

View file

@ -1,3 +0,0 @@
Fabricator(:blocked_domain) do
names ['ftp.ee', 'cache.ee']
end

View file

@ -1,36 +0,0 @@
# default fabricator should be reusable
Fabricator(:certificate) do
api_user
common_name 'cn'
md5 'md5hash'
interface 'api'
csr "-----BEGIN CERTIFICATE REQUEST-----\n" \
"MIIE+DCCAuACAQAwgZ0xCzAJBgNVBAYTAkVFMREwDwYDVQQIDAhIYXJqdW1hYTEQ\n" \
"MA4GA1UEBwwHVGFsbGlubjE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Y77YxLwo/ihB9wghaZKL\n" \
"uV0BxjdZgjDt9GhA8dtPgaCp5LvB6kQYvcEzRvitN2CpJhtz39rlF3gxuy+RtpNf\n" \
"5KbC691FivoXur1qx9I7mc4snB3DTzLiJPIZ6nQzPYcSVpPCbns30N/i/sOdHO0o\n" \
"9hP5wlhCdYrOxad993m+InpMDyDWhB1+TA9ZO7gYpg8S4kBX3Cz9OXe80Pe56ZdK\n" \
"pcgjTXnUDjNSRRGamJib2lyZ/axMbb/etwyy3X+jBDuOQropkmgrPEFJHpgNlFah\n" \
"BuW7KEASqbw5YxpTSc0nDk5uxBw3voL8fk9M1sX64tbzGAEBRZnrWGeb1mOLM/YI\n" \
"K6ocAYSBhNmWUzpHTwL7qSeP9ztQUGzoGHyRjBdan+1U2G75Kpj+TjEm/X8wmtnq\n" \
"3/qVhUYNEavcZbgR1gSE45+mS8NsD7Oq0Xdc0UKsVDbUcCGIkGG9+ERAbRznfi3W\n" \
"qhChtUxySX8T3SmX5mviwlJ5OwQVjdUF1/2voPK0oFK7zV+wZqcuORzDKdqB8XV7\n" \
"MDcQjza4EOB78OmcHDgQ7nMXuY7/UL4F+bRZosxPy43X2JId5d+/GpgV8sP9dzK8\n" \
"UGJDNEZ2YsBbPuKZS+2eNZ8g3sjjFBeadvrQ1w==\n" \
"-----END CERTIFICATE REQUEST-----"
end

View file

@ -1,18 +0,0 @@
Fabricator(:contact) do
registrar { Fabricate(:registrar) }
code { sequence(:code) { |i| "1234#{i}#{rand(1000)}" } }
auth_info 'password'
name 'test name'
phone '+372.12345678'
email { sequence(:email) { |i| "test#{i}@test.com" } }
street 'Short street 11'
city 'Tallinn'
zip '11111'
country_code 'EE'
ident '37605030299'
ident_type 'priv'
ident_country_code 'EE'
# rubocop: disable Style/SymbolProc
after_validation { |c| c.disable_generate_auth_info! }
# rubocop: enamble Style/SymbolProc
end

View file

@ -1,13 +0,0 @@
Fabricator(:dnskey) do
alg 8
flags 257
protocol 3
public_key 'AwEAAaOf5+lz3ftsL+0CCvfJbhUF/NVsNh8BKo61oYs5fXVbuWDiH872 '\
'LC8uKDO92TJy7Q4TF9XMAKMMlf1GMAxlRspD749SOCTN00sqfWx1OMTu '\
'a28L1PerwHq7665oDJDKqR71btcGqyLKhe2QDvCdA0mENimF1NudX1BJ '\
'DDFi6oOZ0xE/0CuveB64I3ree7nCrwLwNs56kXC4LYoX3XdkOMKiJLL/ '\
'MAhcxXa60CdZLoRtTEW3z8/oBq4hEAYMCNclpbd6y/exScwBxFTdUfFk '\
'KsdNcmvai1lyk9vna0WQrtpYpHKMXvY9LFHaJxCOLR4umfeQ42RuTd82 lqfU6ClMeXs='
ds_digest_type 2
domain
end

View file

@ -1,12 +0,0 @@
Fabricator(:domain_contact) do
contact { Fabricate(:contact) }
type 'TechDomainContact'
end
Fabricator(:tech_domain_contact, from: :domain_contact) do
type 'TechDomainContact'
end
Fabricator(:admin_domain_contact, from: :domain_contact) do
type 'AdminDomainContact'
end

View file

@ -1,16 +0,0 @@
Fabricator(:domain) do
name { sequence(:name) { |i| "domain#{i}.ee" } }
valid_to Date.new(2014, 8, 7)
period 1
period_unit 'y'
registrant { Fabricate(:registrant) }
nameservers(count: 3)
admin_domain_contacts(count: 1) { Fabricate(:admin_domain_contact) }
tech_domain_contacts(count: 1) { Fabricate(:tech_domain_contact) }
registrar { Fabricate(:registrar) }
auth_info '98oiewslkfkd'
end
Fabricator(:domain_with_dnskeys, from: :domain) do
after_create { |domain| Fabricate(:dnskey, domain: domain) }
end

View file

@ -1,5 +0,0 @@
Fabricator(:domain_transfer) do
domain
transfer_from { Fabricate(:registrar) }
transfer_to { Fabricate(:registrar) }
end

View file

@ -1 +0,0 @@
Fabricator(:epp_domain, from: :domain, class_name: 'Epp::Domain')

View file

@ -1,4 +0,0 @@
Fabricator(:epp_session) do
session_id 'test'
data { { api_user_id: 1 } }
end

View file

@ -1,13 +0,0 @@
Fabricator(:invoice) do
buyer_name 'Registrar 1'
currency { 'EUR' }
due_date { Time.zone.now.to_date + 1.day }
invoice_type 'DEB'
seller_iban { '123' }
seller_name { 'EIS' }
seller_city { 'Tallinn' }
seller_street { 'Paldiski mnt. 123' }
invoice_items(count: 2)
vat_prc 0.2
buyer { Fabricate(:registrar) }
end

View file

@ -1,6 +0,0 @@
Fabricator(:invoice_item) do
description { 'add money' }
unit 1
amount 1
price 150
end

View file

@ -1,10 +0,0 @@
Fabricator(:keyrelay) do
pa_date { Time.zone.now }
expiry_relative 'P1W'
key_data_public_key 'abc'
key_data_flags 0
key_data_protocol 3
key_data_alg 3
auth_info_pw 'abc'
domain
end

View file

@ -1,3 +0,0 @@
Fabricator(:message) do
body 'fabricator body'
end

View file

@ -1,4 +0,0 @@
Fabricator(:nameserver) do
hostname { sequence(:hostname) { |i| "ns.test#{i}.ee" } }
ipv4 '192.168.1.1'
end

View file

@ -1,18 +0,0 @@
Fabricator(:registrant) do
registrar { Fabricate(:registrar) }
code { sequence(:code) { |i| "REGISTRANT#{i}#{rand(1000)}" } }
auth_info 'password'
name 'test name'
phone '+372.12345678'
email { sequence(:email) { |i| "test#{i}@test.com" } }
street 'Short street 11'
city 'Tallinn'
zip '11111'
country_code 'EE'
ident '37605030299'
ident_type 'priv'
ident_country_code 'EE'
# rubocop: disable Style/SymbolProc
after_validation { |c| c.disable_generate_auth_info! }
# rubocop: enamble Style/SymbolProc
end

View file

@ -1,7 +0,0 @@
Fabricator(:registrant_verification) do
domain_name { sequence(:name) { |i| "domain#{i}.ee" } }
domain(fabricate: :domain)
verification_token '123'
action 'confirmed'
action_type 'registrant_change'
end

View file

@ -1,54 +0,0 @@
Fabricator(:registrar) do
name { sequence(:name) { |i| "Registrar #{i}" } }
reg_no { sequence(:reg_no) { |i| "123#{i}" } }
street 'Street 999'
city 'Town'
state 'County'
zip 'Postal'
email 'info@registrar1.ee'
country_code 'EE'
code { sequence(:code) { |i| "REGISTRAR#{i}" } }
reference_no { sequence(:reference_no) { |i| "RF#{i}" } }
end
Fabricator(:registrar_with_no_account_activities, from: :registrar) do
accounts(count: 1) { Fabricate(:account, account_activities: []) }
end
Fabricator(:registrar1, from: :registrar) do
name 'registrar1'
reg_no '111'
street 'Street 111'
city 'Town'
state 'County'
zip 'Postal'
email 'info@registrar1.ee'
code { sequence(:code) { |i| "FIRST#{i}" } }
end
Fabricator(:registrar2, from: :registrar) do
name 'registrar2'
reg_no '222'
street 'Street 222'
city 'Town'
state 'County'
zip 'Postal'
email 'info@registrar2.ee'
code { sequence(:code) { |i| "SECOND#{i}" } }
end
Fabricator(:eis, from: :registrar) do
name 'EIS'
reg_no '90010019'
phone '+372 727 1000'
country_code 'EE'
vat_no 'EE101286464'
email 'info@internet.ee'
state 'Harjumaa'
city 'Tallinn'
street 'Paldiski mnt 80'
zip '10617'
website 'www.internet.ee'
code { sequence(:code) { |i| "EIS#{i}" } }
accounts(count: 1) { Fabricate(:account, account_activities: []) }
end

View file

@ -1,3 +0,0 @@
Fabricator(:reserved_domain) do
name { sequence(:name) { |i| "domain#{i}.ee" } }
end

View file

@ -1,16 +0,0 @@
Fabricator(:zone, from: 'DNS::Zone') do
origin 'ee'
ttl 43200
refresh 3600
expire 1209600
minimum_ttl 3600
email 'hostmaster.eestiinternet.ee'
master_nameserver 'ns.tld.ee'
ns_records "ee. IN NS ns.ut.ee.\nee. IN NS ns.tld.ee.\nee. IN NS sunic.sunet.se.\n" \
"ee. IN NS ee.aso.ee.\nee. IN NS b.tld.ee.\nee. IN NS ns.eenet.ee.\nee. IN NS e.tld.ee."
a_records "ns.ut.ee. IN A 193.40.5.99\nns.tld.ee. IN A 195.43.87.10\nee.aso.ee. IN A 213.184.51.122\n" \
"b.tld.ee. IN A 194.146.106.110\nns.eenet.ee. IN A 193.40.56.245\ne.tld.ee. IN A 204.61.216.36"
a4_records "ee.aso.ee. IN AAAA 2a02:88:0:21::2\nb.tld.ee. IN AAAA 2001:67c:1010:28::53\n" \
"ns.eenet.ee. IN AAAA 2001:bb8::1\ne.tld.ee. IN AAAA 2001:678:94:53::53"
after_build { |x| x.retry = 900 }
end