Skip to content

Commit

Permalink
Maintenance: Stabilize idoit test by splitting up integration test jobs.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgruner committed Nov 21, 2023
1 parent 84dc90d commit a5696ec
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
42 changes: 22 additions & 20 deletions .gitlab/ci/browser/capybara_integration.yml
@@ -1,40 +1,42 @@
.template_browser-core_capybara_integration:
capybara:integration:other:
extends:
- .template_browser-core_capybara_chrome
- .variables_idoit
services:
- !reference [.services, postgresql]
- !reference [.services, selenium-chrome]
- !reference [.services, redis]
- !reference [.services, idoit]
script:
- !reference [.scripts, zammad_ci_test_prepare]
- bundle exec rspec -t integration --profile 10 spec/system
variables:
IMPORT_OTRS_ENDPOINT: "http://zammad-ci-otrsimport-app/otrs/public.pl?Action=ZammadMigrator"
- bundle exec rspec -t integration -t ~integration_standalone --profile 10 spec/system

capybara:integration:chrome:
capybara:integration:saml:
extends:
- .template_browser-core_capybara_chrome
- .template_browser-core_capybara_integration
- .variables_auth
- .variables_idoit
services:
- !reference [.services, postgresql]
- !reference [.services, selenium-chrome]
- !reference [.services, redis]
- !reference [.services, auth]
- !reference [.services, idoit]
- name: $CI_REGISTRY/docker/zammad-ci-otrsimport-db:otrs6
alias: zammad-ci-otrsimport-db
- name: $CI_REGISTRY/docker/zammad-ci-otrsimport-app:otrs6
alias: zammad-ci-otrsimport-app
script:
- !reference [.scripts, zammad_ci_test_prepare]
- bundle exec rspec -t integration_standalone:saml --profile 10 spec/system

capybara:integration:firefox:
capybara:integration:otrs:
extends:
- .template_browser-core_capybara_firefox
- .template_browser-core_capybara_integration
- .variables_auth
- .variables_idoit
- .template_browser-core_capybara_chrome
variables:
IMPORT_OTRS_ENDPOINT: "http://zammad-ci-otrsimport-app/otrs/public.pl?Action=ZammadMigrator"
services:
- !reference [.services, postgresql]
- !reference [.services, selenium-firefox]
- !reference [.services, selenium-chrome]
- !reference [.services, redis]
- !reference [.services, auth]
- !reference [.services, idoit]
- name: $CI_REGISTRY/docker/zammad-ci-otrsimport-db:otrs6
alias: zammad-ci-otrsimport-db
- name: $CI_REGISTRY/docker/zammad-ci-otrsimport-app:otrs6
alias: zammad-ci-otrsimport-app
script:
- !reference [.scripts, zammad_ci_test_prepare]
- bundle exec rspec -t integration_standalone:otrs --profile 10 spec/system
2 changes: 1 addition & 1 deletion spec/system/import/otrs_spec.rb
Expand Up @@ -3,7 +3,7 @@
require 'rails_helper'

# Mark this job as integration test to run it in the separate job with the required containers.
RSpec.describe 'Import from OTRS', authenticated_as: false, db_strategy: :reset, integration: true, performs_jobs: true, required_envs: %w[IMPORT_OTRS_ENDPOINT IMPORT_OTRS_ENDPOINT_KEY], set_up: false, type: :system do
RSpec.describe 'Import from OTRS', authenticated_as: false, db_strategy: :reset, integration: true, integration_standalone: :otrs, performs_jobs: true, required_envs: %w[IMPORT_OTRS_ENDPOINT IMPORT_OTRS_ENDPOINT_KEY], set_up: false, type: :system do

let(:job) { ImportJob.find_by(name: 'Import::OTRS') }

Expand Down
2 changes: 1 addition & 1 deletion spec/system/saml_spec.rb
Expand Up @@ -4,7 +4,7 @@

require 'keycloak/admin'

RSpec.describe 'SAML Authentication', authenticated_as: false, integration: true, required_envs: %w[KEYCLOAK_BASE_URL KEYCLOAK_ADMIN_USER KEYCLOAK_ADMIN_PASSWORD], type: :system do
RSpec.describe 'SAML Authentication', authenticated_as: false, integration: true, integration_standalone: :saml, required_envs: %w[KEYCLOAK_BASE_URL KEYCLOAK_ADMIN_USER KEYCLOAK_ADMIN_PASSWORD], type: :system do
let(:zammad_base_url) { "#{Capybara.app_host}:#{Capybara.current_session.server.port}" }
let(:zammad_saml_metadata) { "#{zammad_base_url}/auth/saml/metadata" }
let(:saml_base_url) { ENV['KEYCLOAK_BASE_URL'] }
Expand Down

0 comments on commit a5696ec

Please sign in to comment.