Migrate completion tests to Cucumber.

Also retire Fish 2.x + macOS test;
installation of custom brew didn't work out anymore.
This commit is contained in:
Raphael Reitzig 2020-05-25 20:17:31 +02:00
parent ed6039e533
commit 0c15f199cd
12 changed files with 364 additions and 236 deletions

33
test/Dockerfile Normal file
View file

@ -0,0 +1,33 @@
FROM ruby:2.5.8-slim-buster
# Install dependencies
RUN apt-get update \
&& apt-get -y install \
fish \
curl \
unzip \
zip \
&& apt-get clean
WORKDIR app
COPY test/Gemfile ./
RUN bundle install \
&& rm Gemfile
# Switch to non-root user for test context
ARG TEST_HOME="/home/test"
RUN groupadd -r test \
&& useradd --no-log-init -r -g test -m -d $TEST_HOME test
USER test
RUN curl -s "https://get.sdkman.io" | bash
# "Install" sdkman-for-fish
RUN mkdir -p $TEST_HOME/.config/fish/
COPY completions $TEST_HOME/.config/fish/completions/
COPY conf.d $TEST_HOME/.config/fish/conf.d/
COPY completions $TEST_HOME/.config/fish/functions/
RUN ls -R $TEST_HOME/.config/fish/
# Run tests
COPY test ./
CMD cucumber