Maintenance: Also perform browser-based OTRS import test via docker containers...
This commit is contained in:
parent
d2f4a410ab
commit
09fa75d121
2 changed files with 21 additions and 7 deletions
|
@ -2,4 +2,16 @@ otrs_chrome:
|
|||
extends:
|
||||
- .template_browser-integration_import
|
||||
variables:
|
||||
TEST_FILE: "test/integration/otrs_import_browser_test.rb"
|
||||
TEST_FILE: "test/integration/otrs_import_browser_test.rb"
|
||||
FF_NETWORK_PER_BUILD: 1 # https://docs.gitlab.com/runner/configuration/feature-flags.html
|
||||
IMPORT_OTRS_ENDPOINT: "http://zammad-ci-otrsimport-app/otrs/public.pl?Action=ZammadMigrator"
|
||||
TZ: "Europe/Berlin" # Required for the zammad-ci-otrsimport-app containers
|
||||
services:
|
||||
- name: registry.znuny.com/docker/zammad-postgresql:stable
|
||||
alias: postgresql
|
||||
- name: registry.znuny.com/docker/zammad-selenium:stable
|
||||
alias: selenium
|
||||
- name: registry.znuny.com/docker/zammad-ci-otrsimport-db:otrs6
|
||||
alias: zammad-ci-otrsimport-db
|
||||
- name: registry.znuny.com/docker/zammad-ci-otrsimport-app:otrs6
|
||||
alias: zammad-ci-otrsimport-app
|
||||
|
|
|
@ -5,13 +5,15 @@ require 'browser_test_helper'
|
|||
class OtrsImportBrowserTest < TestCase
|
||||
def test_import
|
||||
|
||||
if !ENV['IMPORT_BT_OTRS_ENDPOINT']
|
||||
raise "ERROR: Need IMPORT_BT_OTRS_ENDPOINT - hint IMPORT_BT_OTRS_ENDPOINT='http://vz305.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator'"
|
||||
if !ENV['IMPORT_OTRS_ENDPOINT']
|
||||
raise "ERROR: Need IMPORT_OTRS_ENDPOINT - hint IMPORT_OTRS_ENDPOINT='http://vz305.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator'"
|
||||
end
|
||||
if !ENV['IMPORT_BT_OTRS_ENDPOINT_KEY']
|
||||
raise "ERROR: Need IMPORT_BT_OTRS_ENDPOINT_KEY - hint IMPORT_BT_OTRS_ENDPOINT_KEY='01234567899876543210'"
|
||||
if !ENV['IMPORT_OTRS_ENDPOINT_KEY']
|
||||
raise "ERROR: Need IMPORT_OTRS_ENDPOINT_KEY - hint IMPORT_OTRS_ENDPOINT_KEY='01234567899876543210'"
|
||||
end
|
||||
|
||||
puts "Using endpoint '#{ENV['IMPORT_OTRS_ENDPOINT']}'."
|
||||
|
||||
@browser = browser_instance
|
||||
location(url: browser_url)
|
||||
|
||||
|
@ -20,7 +22,7 @@ class OtrsImportBrowserTest < TestCase
|
|||
click(css: '.js-download')
|
||||
click(css: '.js-otrs-link')
|
||||
|
||||
invalid_key_url = "#{ENV['IMPORT_BT_OTRS_ENDPOINT']};Key=31337"
|
||||
invalid_key_url = "#{ENV['IMPORT_OTRS_ENDPOINT']};Key=31337"
|
||||
|
||||
set(
|
||||
css: '#otrs-link',
|
||||
|
@ -33,7 +35,7 @@ class OtrsImportBrowserTest < TestCase
|
|||
value: 'Invalid API key.',
|
||||
)
|
||||
|
||||
import_url = "#{ENV['IMPORT_BT_OTRS_ENDPOINT']};Key=#{ENV['IMPORT_BT_OTRS_ENDPOINT_KEY']}"
|
||||
import_url = "#{ENV['IMPORT_OTRS_ENDPOINT']};Key=#{ENV['IMPORT_OTRS_ENDPOINT_KEY']}"
|
||||
set(
|
||||
css: '#otrs-link',
|
||||
value: import_url
|
||||
|
|
Loading…
Reference in a new issue