Тест GitLab pipe e2e в контейнере docker не пройден - PullRequest
0 голосов
/ 09 марта 2020
 [11:05:45] I/launcher - Running 1 instances of WebDriver
 [11:05:45] I/direct - Using ChromeDriver directly...
 [11:05:45] E/launcher - unknown error: Chrome failed to start: exited abnormally.
   (unknown error: DevToolsActivePort file doesn't exist)
   (The process started from chrome location /opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
   (Driver info: chromedriver=80.0.3987.16 (320f6526c1632ad4f205ebce69b99a062ed78647-refs/branch-heads/3987@{#185}),platform=Linux 4.19.78-coreos x86_64)
 [11:05:45] E/launcher - WebDriverError: unknown error: Chrome failed to start: exited abnormally.
   (unknown error: DevToolsActivePort file doesn't exist)
   (The process started from chrome location /opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
   (Driver info: chromedriver=80.0.3987.16 (320f6526c1632ad4f205ebce69b99a062ed78647-refs/branch-heads/3987@{#185}),platform=Linux 4.19.78-coreos x86_64)
     at Object.checkLegacyResponse (/builds/raphael.brunn3r/tqranalytics/node_modules/selenium-webdriver/lib/error.js:546:15)
     at parseHttpResponse (/builds/raphael.brunn3r/tqranalytics/node_modules/selenium-webdriver/lib/http.js:509:13)
     at /builds/raphael.brunn3r/tqranalytics/node_modules/selenium-webdriver/lib/http.js:441:30
     at processTicksAndRejections (internal/process/task_queues.js:97:5)
 From: Task: WebDriver.createSession()
     at Function.createSession (/builds/raphael.brunn3r/tqranalytics/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
     at Function.createSession (/builds/raphael.brunn3r/tqranalytics/node_modules/selenium-webdriver/chrome.js:761:15)
     at Direct.getNewDriver (/builds/raphael.brunn3r/tqranalytics/node_modules/protractor/built/driverProviders/direct.js:77:33)
     at Runner.createBrowser (/builds/raphael.brunn3r/tqranalytics/node_modules/protractor/built/runner.js:195:43)
     at /builds/raphael.brunn3r/tqranalytics/node_modules/protractor/built/runner.js:339:29
     at _fulfilled (/builds/raphael.brunn3r/tqranalytics/node_modules/q/q.js:834:54)
     at /builds/raphael.brunn3r/tqranalytics/node_modules/q/q.js:863:30
     at Promise.promise.promiseDispatch (/builds/raphael.brunn3r/tqranalytics/node_modules/q/q.js:796:13)
     at /builds/raphael.brunn3r/tqranalytics/node_modules/q/q.js:556:49
     at runSingle (/builds/raphael.brunn3r/tqranalytics/node_modules/q/q.js:137:13)
 [11:05:45] E/launcher - Process exited with error code 199
 ERROR: Job failed: exit code 1

Я получаю эту ошибку, но не могу понять, как ее исправить. он работает локально, но когда я отправляю его в gitlab и пытаюсь запустить тесты в контейнере docker (изображение trion / ng-cli-karma: 8.3.25), это не удается. ниже вы можете найти мой файл YML.

image: trion/ng-cli-karma:${CLI_VERSION}

stages:
  - test
  - deploy

variables:  
  CLI_VERSION: 8.3.25

run_tests:
  stage: test
  allow_failure: false
  before_script:
    - npm ci
    - google-chrome --version
  script:
    - ng test --progress false --watch false
    - ng e2e -c=mock
  only:
    - development
    - master
  artifacts:
    expire_in: 1 day
    paths:
      - .dist/
  tags:
  - docker
...