Skip to content

Commit

Permalink
Maintenance: Use an i-doit service container for the i-doit integrati…
Browse files Browse the repository at this point in the history
…on tests.
  • Loading branch information
mgruner committed Apr 28, 2023
1 parent 9a9041c commit 74c1a36
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 480 deletions.
10 changes: 10 additions & 0 deletions .gitlab/ci/__includes__/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
MATTERMOST_PASSWORD: 'zammad'
MATTERMOST_CHANNEL: 'zammad-channel'

.variables_idoit:
variables:
IDOIT_API_CATEGORY: "Building"
IDOIT_API_ENDPOINT: "http://ci-service-idoit:80"
IDOIT_API_TOKEN: "admin"

.variables_auth:
variables:
KEYCLOAK_BASE_URL: http://ci-service-auth:8080
Expand Down Expand Up @@ -87,3 +93,7 @@
mattermost:
name: $CI_REGISTRY/docker/zammad-mattermost:stable
alias: ci-service-mattermost

idoit:
name: $CI_REGISTRY/docker/zammad-idoit:stable
alias: ci-service-idoit
4 changes: 4 additions & 0 deletions .gitlab/ci/browser/capybara_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ capybara:integration:chrome:
- .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
Expand All @@ -26,11 +28,13 @@ capybara:integration:firefox:
- .template_browser-core_capybara_firefox
- .template_browser-core_capybara_integration
- .variables_auth
- .variables_idoit
services:
- !reference [.services, mysql]
- !reference [.services, selenium-firefox]
- !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
Expand Down
2 changes: 1 addition & 1 deletion spec/support/vcr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'vcr'

VCR_IGNORE_MATCHING_HOSTS = %w[elasticsearch selenium ci-service-mattermost zammad.org zammad.com znuny.com google.com login.microsoftonline.com github.com].freeze
VCR_IGNORE_MATCHING_HOSTS = %w[elasticsearch selenium ci-service- zammad.org zammad.com znuny.com google.com login.microsoftonline.com github.com].freeze
VCR_IGNORE_MATCHING_REGEXPS = [
%r{^192\.168\.\d+\.\d+$}, # typical home network address
%r{^172\.17\.0\.\d+$}, # docker
Expand Down
2 changes: 1 addition & 1 deletion spec/system/ticket/idoit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'rails_helper'

RSpec.describe 'Ticket Handling with i-doit', integration: true, required_envs: %w[IDOIT_API_TOKEN IDOIT_API_ENDPOINT IDOIT_API_CATEGORY], type: :system, use_vcr: true do
RSpec.describe 'Ticket Handling with i-doit', integration: true, required_envs: %w[IDOIT_API_TOKEN IDOIT_API_ENDPOINT IDOIT_API_CATEGORY], type: :system do

let(:api_endpoint) { ENV['IDOIT_API_ENDPOINT'] }
let(:api_category) { ENV['IDOIT_API_CATEGORY'] }
Expand Down
Loading

0 comments on commit 74c1a36

Please sign in to comment.