diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index a814a06..cc69619 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -26,13 +26,6 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - - name: Wait for PostgreSQL to become ready - uses: actions/wait-for-it@v2 - with: - host: localhost - port: ${{ job.services.postgres.ports[5432] }} - timeout: 60 - name: config bundler run: | @@ -53,10 +46,12 @@ jobs: DISABLE_SPRING: 1 run: | cp config/application.yml.example config/application.yml + cp config/database_ci.yml config/database.yml bundle exec rake db:create bundle exec rake db:migrate bundle exec rake db:schema:load bundle exec rake db:seed + bundle exec rails assets:precompile bundle exec rspec spec - name: Dependabot diff --git a/config/application.yml.example b/config/application.yml.example index 75340c2..d9813c4 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -12,8 +12,8 @@ epp_port: '700' # repp_url: 'http://localhost:8080/repp/v1/' repp_url: 'http://registry:3000/repp/v1/' -# cert_path: '/opt/ca/certs/webclient.crt.pem' -# key_path: '/opt/ca/private/webclient.key.pem' +cert_path: 'spec/support/fixtures/certificates/webclient.crt.pem' +key_path: 'spec/support/fixtures/certificates/webclient.key.pem' # ca_key_password: 123456 registrar_tara_identifier: '' diff --git a/config/database_ci.yml b/config/database_ci.yml new file mode 100644 index 0000000..7026ce4 --- /dev/null +++ b/config/database_ci.yml @@ -0,0 +1,11 @@ +default: &default + host: localhost + adapter: postgresql + encoding: unicode + pool: 5 + username: postgres + password: password + +test: + <<: *default + database: eis_billing_system_test diff --git a/spec/requests/settings/configuration_spec.rb b/spec/requests/settings/configuration_spec.rb index 72569d6..97de737 100644 --- a/spec/requests/settings/configuration_spec.rb +++ b/spec/requests/settings/configuration_spec.rb @@ -26,6 +26,7 @@ XML + allow_any_instance_of(Epp::Server).to receive(:open_connection).and_return(xml_schema) allow_any_instance_of(Epp::Server).to receive(:send_request).and_return(xml_schema) crt_file_path = "#{Rails.root}/spec/support/fixtures/certificates/webclient.crt.pem" @@ -94,6 +95,7 @@ XML + allow_any_instance_of(Epp::Server).to receive(:open_connection).and_return(xml_schema) allow_any_instance_of(Epp::Server).to receive(:send_request).and_return(xml_schema) crt_file_path = "#{Rails.root}/spec/support/fixtures/certificates/webclient.crt.pem" diff --git a/spec/requests/settings/est_tld/validations_spec.rb b/spec/requests/settings/est_tld/validations_spec.rb index f2b04be..670067c 100644 --- a/spec/requests/settings/est_tld/validations_spec.rb +++ b/spec/requests/settings/est_tld/validations_spec.rb @@ -37,6 +37,7 @@ XML + allow_any_instance_of(Epp::Server).to receive(:open_connection).and_return(xml_schema) allow_any_instance_of(Epp::Server).to receive(:send_request).and_return(xml_schema) post settings_est_tld_validations_path, params: { @@ -75,6 +76,7 @@ XML + allow_any_instance_of(Epp::Server).to receive(:open_connection).and_return(xml_schema) allow_any_instance_of(Epp::Server).to receive(:send_request).and_return(xml_schema) post settings_est_tld_validations_path, params: {