tests: Switch to using CentOS8 for the Docker tests

This also moves the packages to be installed into a file that can be
shared between test methods.

It drops several packages that are unnecessary for testing, and excludes
those paths from pylint checks using pocketlint.

Related: rhbz#1785154
This commit is contained in:
Brian C. Lane 2020-02-05 14:40:59 -08:00
parent c1af43d56f
commit dfdc05df5f
4 changed files with 32 additions and 35 deletions

View File

@ -1,36 +1,8 @@
FROM registry.fedoraproject.org/fedora:28 FROM centos:8
RUN dnf -y install \ RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
anaconda-tui \ COPY ./test-packages .
libgit2-glib \ RUN dnf -y install $(cat ./test-packages) && touch /.in-container
libselinux-python3 \ RUN pip3 install pocketlint
make \
pykickstart \
python3-coverage \
python3-coveralls \
python3-flask \
python3-gevent \
python3-magic \
python3-mako \
python3-nose \
python3-pocketlint \
python3-pylint \
python3-pyparted \
python3-pytoml \
python3-semantic_version \
python3-sphinx \
python3-rpmfluff \
python3-librepo \
beakerlib \
sudo \
tito \
rsync \
e2fsprogs \
xz-lzma-compat \
pbzip2 \
squashfs-tools \
qemu-img \
which && \
touch /.in-container
RUN useradd weldr RUN useradd weldr
VOLUME /lorax-ro VOLUME /lorax-ro
VOLUME /test-results VOLUME /test-results

View File

@ -52,7 +52,7 @@ test:
--cover-package=pylorax --cover-inclusive \ --cover-package=pylorax --cover-inclusive \
./tests/pylorax/ ./tests/composer/ ./tests/pylorax/ ./tests/composer/
coverage3 report -m coverage-3 report -m
[ -f "/usr/bin/coveralls" ] && [ -n "$(COVERALLS_REPO_TOKEN)" ] && coveralls || echo [ -f "/usr/bin/coveralls" ] && [ -n "$(COVERALLS_REPO_TOKEN)" ] && coveralls || echo
# need `losetup`, which needs Docker to be in privileged mode (--privileged) # need `losetup`, which needs Docker to be in privileged mode (--privileged)

25
test-packages Normal file
View File

@ -0,0 +1,25 @@
anaconda-tui
libgit2-glib
libselinux-python3
make
pykickstart
python3-coverage
python3-coveralls
python3-flask
python3-gevent
python3-magic
python3-mako
python3-nose
python3-pylint
python3-pyparted
python3-pytoml
python3-semantic_version
python3-rpmfluff
python3-librepo
sudo
rsync
e2fsprogs
squashfs-tools
qemu-img
which
git

View File

@ -28,7 +28,7 @@ class LoraxLintConfig(PocketLintConfig):
@property @property
def ignoreNames(self): def ignoreNames(self):
return { "bots", "rpmbuild", "tito" } return { "bots", "rpmbuild", "rel-eng", "docs", "test" }
@property @property
def extraArgs(self): def extraArgs(self):