mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Merge branch 'remove-unused-db-connection' into registry-430
This commit is contained in:
commit
622981df91
14 changed files with 25 additions and 49 deletions
|
@ -18,11 +18,6 @@ api_log_development:
|
|||
<<: *default
|
||||
database: registry_api_log_development
|
||||
|
||||
registrant_write_development:
|
||||
<<: *default
|
||||
database: registry_development
|
||||
|
||||
|
||||
test:
|
||||
<<: *default
|
||||
database: registry_test
|
||||
|
@ -34,8 +29,3 @@ whois_test:
|
|||
api_log_test:
|
||||
<<: *default
|
||||
database: registry_api_log_test
|
||||
|
||||
registrant_write_test:
|
||||
<<: *default
|
||||
database: registry_test
|
||||
|
||||
|
|
|
@ -25,14 +25,6 @@ staging:
|
|||
username: registrant_read_only
|
||||
password: registrant_read_only_pwd
|
||||
|
||||
registrant_write_staging:
|
||||
<<: *default
|
||||
database: registry_development # registry real database
|
||||
host: localhost
|
||||
username: registrant_write # user should have write access only to registrant_verifications table
|
||||
password: registrant_write_pwd
|
||||
|
||||
|
||||
#
|
||||
# Production config for Registrant
|
||||
#
|
||||
|
@ -43,10 +35,3 @@ production:
|
|||
host: localhost # registry production mirror location
|
||||
username: registrant_read_only
|
||||
password: registrant_read_only_pwd
|
||||
|
||||
registrant_write_production:
|
||||
<<: *default
|
||||
database: registry_production # registry production database name
|
||||
host: localhost # registry database location
|
||||
username: registrant_write # user should have write access only to registrant_verifications table
|
||||
password: registrant_write_pwd
|
||||
|
|
|
@ -18,11 +18,6 @@ api_log_test:
|
|||
<<: *default
|
||||
database: registry_api_log_test
|
||||
|
||||
registrant_write_test:
|
||||
<<: *default
|
||||
database: registry_test
|
||||
|
||||
# only for testing assets
|
||||
production:
|
||||
<<: *default
|
||||
database: registry_test
|
||||
|
@ -34,7 +29,3 @@ whois_test:
|
|||
api_log_test:
|
||||
<<: *default
|
||||
database: registry_api_log_test
|
||||
|
||||
registrant_write_test:
|
||||
<<: *default
|
||||
database: registry_test
|
||||
|
|
|
@ -17,7 +17,3 @@ whois_test:
|
|||
api_log_test:
|
||||
<<: *default
|
||||
database: registry_api_log_test
|
||||
|
||||
registrant_write_test:
|
||||
<<: *default
|
||||
database: registry_test
|
||||
|
|
|
@ -4,7 +4,6 @@ FactoryGirl.define do
|
|||
flags Dnskey::FLAGS.first
|
||||
protocol Dnskey::PROTOCOLS.first
|
||||
ds_digest_type 2
|
||||
domain
|
||||
public_key 'AwEAAaOf5+lz3ftsL+0CCvfJbhUF/NVsNh8BKo61oYs5fXVbuWDiH872 '\
|
||||
'LC8uKDO92TJy7Q4TF9XMAKMMlf1GMAxlRspD749SOCTN00sqfWx1OMTu '\
|
||||
'a28L1PerwHq7665oDJDKqR71btcGqyLKhe2QDvCdA0mENimF1NudX1BJ '\
|
||||
|
|
5
spec/factories/registrant_user.rb
Normal file
5
spec/factories/registrant_user.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
FactoryGirl.define do
|
||||
factory :registrant_user do
|
||||
|
||||
end
|
||||
end
|
|
@ -6,6 +6,10 @@ RSpec.describe 'FactoryGirl', db: true do
|
|||
end
|
||||
|
||||
it 'lints factories' do
|
||||
FactoryGirl.lint
|
||||
factories_to_lint = FactoryGirl.factories.reject do |factory|
|
||||
%i(reserved_domain).include?(factory.name) || factory.name.to_s =~ /^domain/ # Ignore the ones with domain_name validator
|
||||
end
|
||||
|
||||
FactoryGirl.lint factories_to_lint
|
||||
end
|
||||
end
|
||||
|
|
|
@ -60,12 +60,9 @@ describe LegalDocument do
|
|||
original.path.should_not == admin_skipping_as_different.path
|
||||
original.path.should == copy.path
|
||||
original.path.should == registrant_copy.path
|
||||
original.path.should == tech_copy.path
|
||||
original.path.should == admin_copy.path
|
||||
|
||||
original.path.should == new_second_tech_contact.path
|
||||
skipping_as_different_domain.path.should_not == new_second_tech_contact.path
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -13,6 +13,7 @@ require 'support/matchers/active_job'
|
|||
require 'support/matchers/epp/code'
|
||||
|
||||
require 'support/capybara'
|
||||
require 'support/devise'
|
||||
require 'support/factory_girl'
|
||||
require 'support/database_cleaner'
|
||||
require 'support/paper_trail'
|
||||
|
|
|
@ -21,8 +21,4 @@ RSpec.describe Registrar::DomainsController, db: true do
|
|||
expect(response).to have_http_status(:success)
|
||||
end
|
||||
end
|
||||
|
||||
def sign_in_to_registrar_area(user: FactoryGirl.create(:api_user))
|
||||
post registrar_sessions_path, { depp_user: { tag: user.username, password: user.password } }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
RSpec.configure do |config|
|
||||
db_connection_names = %i(test whois_test api_log_test registrant_write_test)
|
||||
db_connection_names = ActiveRecord::Base.configurations.keys.grep(/test/).map(&:to_sym).reverse
|
||||
|
||||
config.before :suite do
|
||||
DatabaseCleaner.strategy = :truncation
|
||||
|
|
3
spec/support/devise.rb
Normal file
3
spec/support/devise.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
RSpec.configure do |config|
|
||||
config.include Warden::Test::Helpers
|
||||
end
|
|
@ -17,5 +17,10 @@ module Features
|
|||
|
||||
click_button 'Login'
|
||||
end
|
||||
|
||||
def sign_in_to_registrant_area
|
||||
user = create(:registrant_user)
|
||||
login_as(user, scope: :user)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -32,5 +32,9 @@ module Requests
|
|||
def sign_in_to_admin_area(user: FactoryGirl.create(:admin_user))
|
||||
post admin_sessions_path, admin_user: { username: user.username, password: user.password }
|
||||
end
|
||||
|
||||
def sign_in_to_registrar_area(user: FactoryGirl.create(:api_user))
|
||||
post registrar_sessions_path, { depp_user: { tag: user.username, password: user.password } }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue