From 72b3fdebad3fe6fd4eb22643db6e9bd554085791 Mon Sep 17 00:00:00 2001 From: Oleg Hasjanov Date: Fri, 18 Jun 2021 14:04:27 +0300 Subject: [PATCH] updated application yml sample file for system tests --- app/models/depp/domain.rb | 29 ++++++++++--------- config/application.yml.sample | 13 +++++++++ .../registrar_area/domain/domain_test.rb | 20 ------------- 3 files changed, 29 insertions(+), 33 deletions(-) delete mode 100644 test/system/registrar_area/domain/domain_test.rb diff --git a/app/models/depp/domain.rb b/app/models/depp/domain.rb index 451cfa458..398839f80 100644 --- a/app/models/depp/domain.rb +++ b/app/models/depp/domain.rb @@ -61,21 +61,22 @@ module Depp period = domain_params[:period].to_i.to_s period_unit = domain_params[:period][-1].to_s - xml = if domain_params[:nameservers_attributes].select { |key, value| value['hostname'].present? }.any? + xml = if domain_params[:nameservers_attributes] + .select { |_key, value| value['hostname'].present? }.any? epp_xml.create({ - name: { value: domain_params[:name] }, - period: { value: period, attrs: { unit: period_unit } }, - ns: Domain.create_nameservers_hash(domain_params), - registrant: { value: domain_params[:registrant] }, - _anonymus: Domain.create_contacts_hash(domain_params) - }, dns_hash, Domain.construct_custom_params_hash(domain_params)) + name: { value: domain_params[:name] }, + period: { value: period, attrs: { unit: period_unit } }, + ns: Domain.create_nameservers_hash(domain_params), + registrant: { value: domain_params[:registrant] }, + _anonymus: Domain.create_contacts_hash(domain_params) + }, dns_hash, Domain.construct_custom_params_hash(domain_params)) else epp_xml.create({ - name: { value: domain_params[:name] }, - period: { value: period, attrs: { unit: period_unit } }, - registrant: { value: domain_params[:registrant] }, - _anonymus: Domain.create_contacts_hash(domain_params) - }, dns_hash, Domain.construct_custom_params_hash(domain_params)) + name: { value: domain_params[:name] }, + period: { value: period, attrs: { unit: period_unit } }, + registrant: { value: domain_params[:registrant] }, + _anonymus: Domain.create_contacts_hash(domain_params) + }, dns_hash, Domain.construct_custom_params_hash(domain_params)) end current_user.request(xml) @@ -239,7 +240,9 @@ module Depp if domain_params[:registrant] != old_domain_params[:registrant] chg = [{ registrant: { value: domain_params[:registrant] } }] unless domain_params[:verified].present? - chg = [{ registrant: { value: domain_params[:registrant], attrs: { verified: 'yes' } } }] if domain_params[:verified] + if domain_params[:verified] + chg = [{ registrant: { value: domain_params[:registrant], attrs: { verified: 'yes' } } }] + end end add_arr = nil if add_arr.none? diff --git a/config/application.yml.sample b/config/application.yml.sample index 02396aad3..70bb4a1b5 100644 --- a/config/application.yml.sample +++ b/config/application.yml.sample @@ -198,6 +198,19 @@ test: cdns_scanner_output_file: 'test/fixtures/files/cdns_output.txt' dnssec_resolver_ips: 8.8.8.8, 8.8.4.4 legal_documents_dir: 'test/fixtures/files' + + openssl_config_path: 'test/fixtures/files/test_ca/openssl.cnf' + crl_dir: 'test/fixtures/files/test_ca/crl' + crl_path: 'test/fixtures/files/test_ca/crl/crl.pem' + ca_cert_path: 'test/fixtures/files/test_ca/certs/ca.crt.pem' + ca_key_path: 'test/fixtures/files/test_ca/private/ca.key.pem' + ca_key_password: 'password' + + cert_path: 'test/fixtures/files/webclient/webclient.crt.pem' + key_path: 'test/fixtures/files/webclient/webclient.key.pem' + epp_hostname: 'epp_proxy' + epp_port: '700' + epp_sessions_per_registrar: '4' # Airbrake // Errbit: airbrake_host: "https://your-errbit-host.ee" diff --git a/test/system/registrar_area/domain/domain_test.rb b/test/system/registrar_area/domain/domain_test.rb deleted file mode 100644 index 3e5ce91db..000000000 --- a/test/system/registrar_area/domain/domain_test.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'application_system_test_case' - -class Domainest < ApplicationSystemTestCase - setup do - @user = users(:api_bestnames) - @contact = contacts(:jack) - - @domain = domains(:shop) - - sign_in @user - end - - def test_update_tech_contact - visit edit_registrar_domains_path + "?domain_name=#{@domain.name}" - fill_in 'domain_contacts_attributes_0_code_helper', with: "#{@contact.code} #{@contact.name}" - click_on 'Save' - - assert_redirect_to info_registrar_domains_url(domain_name: @domain_params[:name]) - end -end