diff --git a/Dockerfile_test b/Dockerfile_test new file mode 100644 index 0000000..baaa989 --- /dev/null +++ b/Dockerfile_test @@ -0,0 +1,35 @@ +# Run tests inside docker without requiring full installation of dependencies on local machine +# Simply run "docker build -f Dockerfile_test ." +# WARNING: sometimes it fails with a core dumped exception + +FROM node:6-stretch +MAINTAINER Petr Sloup + +RUN apt-get -qq update \ +&& DEBIAN_FRONTEND=noninteractive apt-get -y install \ + apt-transport-https \ + curl \ + unzip \ + build-essential \ + python \ + libcairo2-dev \ + libgles2-mesa-dev \ + libgbm-dev \ + libllvm3.9 \ + libprotobuf-dev \ + libxxf86vm-dev \ + xvfb \ +&& apt-get clean + +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +RUN wget -O test_data.zip https://github.com/klokantech/tileserver-gl/releases/download/v1.3.0/test_data.zip +RUN unzip -q test_data.zip -d test_data + +ENV NODE_ENV="test" + +COPY package.json . +RUN npm install +COPY / . +RUN xvfb-run --server-args="-screen 0 1024x768x24" npm test diff --git a/public/templates/data.tmpl b/public/templates/data.tmpl index 3d05522..b6ba35e 100644 --- a/public/templates/data.tmpl +++ b/public/templates/data.tmpl @@ -5,10 +5,10 @@ {{name}} - TileServer GL {{#is_vector}} - - - - + + + + {{/is_vector}} {{^is_vector}} - - - + + +