Skip to content

Commit

Permalink
Fix chromedriver installation.
Browse files Browse the repository at this point in the history
  • Loading branch information
plietar committed Nov 27, 2024
1 parent d2dd35f commit 6ec2024
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 40 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
45 changes: 11 additions & 34 deletions integration-tests.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 6 additions & 5 deletions scripts/install-chromedriver.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6ec2024

Please sign in to comment.