Files
gerrit/polygerrit-ui/app/test/functional/infra/Dockerfile
Viktar Donich 7cbe1e493e Functional test suite starter
Contains test runner Docker file and a sample smoke test. Smoke test
build PolyGerrit app, serves it locally and expects page title to be
updated to the default value.

Change-Id: I8ab2ca8a97830eefa1c697c2e51be82cbc1657c7
2018-02-13 20:12:30 -08:00

39 lines
857 B
Docker

FROM selenium/standalone-chrome-debug
USER root
# nvm environment variables
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 9.4.0
# install nvm
# https://github.com/creationix/nvm#install-script
RUN wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
# install node and npm
RUN [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
RUN npm install -g jasmine
RUN npm install -g http-server
USER seluser
RUN mkdir -p /tmp/app
WORKDIR /tmp/app
RUN npm init -y
RUN npm install --save selenium-webdriver
EXPOSE 8080
COPY test-infra.js /tmp/app/node_modules
COPY run.sh /tmp/app/
ENTRYPOINT [ "/tmp/app/run.sh" ]