-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
703e00a
commit 8481fda
Showing
3 changed files
with
46 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,12 +17,13 @@ LABEL org.label-schema.title="Testinfra Docker container" \ | |
org.opencontainers.image.vendor="WyriHaximus.net" \ | ||
org.opencontainers.image.authors="Cees-Jan Kiewiet <[email protected]>" | ||
|
||
WORKDIR /project | ||
|
||
# hadolint ignore=DL3018 | ||
RUN apk add --no-cache docker python3 py-pip | ||
# hadolint ignore=DL3013 | ||
RUN pip install --no-cache-dir docker --break-system-packages && \ | ||
# hadolint ignore=DL3018,DL3013 | ||
RUN set -e && \ | ||
apk add --no-cache docker python3 py-pip && \ | ||
pip3 install --no-cache-dir --upgrade pip --break-system-packages && \ | ||
pip install --no-cache-dir docker --break-system-packages && \ | ||
pip install --no-cache-dir pytest-testinfra --break-system-packages | ||
|
||
WORKDIR /tests | ||
|
||
ENTRYPOINT ["py.test", "-p", "no:cacheprovider"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import pytest | ||
|
||
def test_docker(host): | ||
output = host.run('docker -v') | ||
assert output.rc == 0 | ||
assert u'Docker version ' in output.stdout | ||
assert output.stderr == '' | ||
|
||
def test_pip(host): | ||
assert host.exists("pip") | ||
|
||
def test_pytest(host): | ||
assert host.exists("py.test") |