diff --git a/README.md b/README.md index 1e8e516..cddd8e2 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,8 @@ Run unit tests with `npm run test`. Jest will pick up test in files with the `.t To run integration tests: +1. Make sure have chrome installed 1. First install chromedriver `sudo ./scripts/install-chromedriver.sh` -1. Make sure you also have a compatible version of chrome (110) 1. Run the proxy and dependencies with `./scripts/dev.sh` 1. Then run tests with `npm run integration-test` diff --git a/integration-tests.dockerfile b/integration-tests.dockerfile index c9adb08..ed2645e 100755 --- a/integration-tests.dockerfile +++ b/integration-tests.dockerfile @@ -2,50 +2,27 @@ ARG MONTAGU_GIT_ID="UNKNOWN" FROM vimc/montagu-reverse-proxy-shared-build-env:$MONTAGU_GIT_ID RUN apt-get update && apt-get install -yq \ - default-jre \ - gconf-service \ + fonts-liberation \ libasound2 \ - libatk1.0-0 \ libatk-bridge2.0-0 \ - libc6 \ - libcairo2 \ + libatk1.0-0 \ + libatspi2.0-0 \ libcups2 \ - libdbus-1-3 \ libdrm2 \ - libexpat1 \ - libfontconfig1 \ - libgcc1 \ - libgconf-2-4 \ - libgdk-pixbuf2.0-0 \ - libglib2.0-0 \ - libgtk-3-0 \ libgbm1 \ + libgtk-3-0 \ libnspr4 \ - libpango-1.0-0 \ - libpangocairo-1.0-0 \ - libstdc++6 \ - libx11-6 \ - libx11-xcb1 \ - libxcb1 \ + libnss3 \ + libvulkan1 \ libxcomposite1 \ - libxcursor1 \ libxdamage1 \ - libxext6 \ libxfixes3 \ - libxi6 \ + libxkbcommon0 \ libxrandr2 \ - libxrender1 \ - libxss1 \ - libxtst6 \ - libu2f-udev \ - libvulkan1 \ - ca-certificates \ - fonts-liberation \ - libappindicator1 \ - libnss3 \ - lsb-release \ - xdg-utils \ - wget + xdg-utils + +RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb +RUN dpkg -i google-chrome-stable_current_amd64.deb RUN ./scripts/install-chromedriver.sh diff --git a/scripts/install-chromedriver.sh b/scripts/install-chromedriver.sh index 2144708..c520ed5 100755 --- a/scripts/install-chromedriver.sh +++ b/scripts/install-chromedriver.sh @@ -1,10 +1,11 @@ #!/usr/bin/env bash -apt-get update -apt-get install -y unzip xvfb libxi6 libgconf-2-4 +set -eu + +VERSION=$(google-chrome --product-version) + +wget https://storage.googleapis.com/chrome-for-testing-public/$VERSION/linux64/chromedriver-linux64.zip +unzip -j -d /usr/bin chromedriver-linux64.zip chromedriver-linux64/chromedriver -wget https://chromedriver.storage.googleapis.com/113.0.5672.63/chromedriver_linux64.zip -unzip chromedriver_linux64.zip -mv chromedriver /usr/bin/chromedriver chown root:root /usr/bin/chromedriver chmod +x /usr/bin/chromedriver