Skip to content

Commit

Permalink
added ci database
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed Jul 26, 2023
1 parent 1cb072f commit cc93ec2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions config/application.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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: ''
Expand Down
11 changes: 11 additions & 0 deletions config/database_ci.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions spec/requests/settings/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
</epp>
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"
Expand Down Expand Up @@ -94,6 +95,7 @@
</epp>
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"
Expand Down
2 changes: 2 additions & 0 deletions spec/requests/settings/est_tld/validations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
</epp>
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: {
Expand Down Expand Up @@ -75,6 +76,7 @@
</epp>
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: {
Expand Down

0 comments on commit cc93ec2

Please sign in to comment.