mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 05:03:33 -05:00
working docker image which can run the acceptance tests
This commit is contained in:
parent
c38d903f92
commit
bca8f6c376
3 changed files with 30 additions and 3 deletions
|
@ -1,10 +1,12 @@
|
|||
FROM ubuntu
|
||||
|
||||
COPY ./test/acceptance/docker-entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
RUN apt-get update && apt-get upgrade
|
||||
RUN apt-get install build-essential redis-server mongodb-server nodejs npm
|
||||
RUN apt-get update && apt-get upgrade -y
|
||||
RUN apt-get install -y build-essential redis-server mongodb-server nodejs npm
|
||||
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
||||
RUN npm install -g grunt-cli
|
||||
|
||||
RUN mkdir /document-updater
|
||||
VOLUME /document-updater
|
||||
|
|
|
@ -5,4 +5,11 @@ service mongodb start
|
|||
|
||||
cd /document-updater
|
||||
npm install
|
||||
grunt test:acceptance:docker
|
||||
|
||||
|
||||
source ./test/acceptance/scripts/full-test.sh
|
||||
|
||||
service redis-server stop
|
||||
service mongodb stop
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
echo ">> Starting server..."
|
||||
|
||||
grunt >> /dev/null &
|
||||
_pid="$!"
|
||||
|
||||
echo ">> Server started with pid: $_pid"
|
||||
|
||||
sleep 20
|
||||
|
||||
echo ">> Running acceptance tests..."
|
||||
grunt test:acceptance
|
||||
|
||||
echo ">> Killing server (pid: $_pid)"
|
||||
kill -1 "$_pid"
|
||||
|
||||
echo ">> Done"
|
Loading…
Reference in a new issue