-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
2 changed files
with
81 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: "3.4" | ||
|
||
services: | ||
sut: | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
entrypoint: [""] | ||
command: ["/usr/bin/in_sanity"] |
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,72 @@ | ||
#!/bin/sh | ||
# | ||
# Shell script to test the MongoDB Docker image. | ||
# | ||
# Copyright 2016-2019, Frederico Martins | ||
# Author: Frederico Martins <http:https://github.com/fscm> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
# This program is free software. You can use it and/or modify it under the | ||
# terms of the MIT License. | ||
# | ||
|
||
# Variables | ||
|
||
echo "=== Docker Build Test ===" | ||
|
||
echo -n "[TEST] Check if iptables is installed... " | ||
iptables --version > /dev/null 2>&1 | ||
if [ "$?" -eq "0" ]; then | ||
echo 'OK' | ||
else | ||
echo 'Failed' | ||
exit 1 | ||
fi | ||
|
||
echo -n "[TEST] Check if OpenSSL is installed... " | ||
openssl version > /dev/null 2>&1 | ||
if [ "$?" -eq "0" ]; then | ||
echo 'OK' | ||
else | ||
echo 'Failed' | ||
exit 2 | ||
fi | ||
|
||
echo -n "[TEST] Check if Root Certificates are installed... " | ||
(echo | openssl s_client -connect google.com:443 2>&1) | grep -q 'Verify return code: 0 (ok)' | ||
if [ "$?" -eq "0" ]; then | ||
echo 'OK' | ||
else | ||
echo 'Failed' | ||
exit 3 | ||
fi | ||
|
||
echo -n "[TEST] Check if OpenVPN is installed... " | ||
openvpn --show-ciphers > /dev/null 2>&1 | ||
if [ "$?" -eq "0" ]; then | ||
echo 'OK' | ||
else | ||
echo 'Failed' | ||
exit 4 | ||
fi | ||
|
||
echo -n "[TEST] Check if Python is installed... " | ||
python --version > /dev/null 2>&1 | ||
if [ "$?" -eq "0" ]; then | ||
echo 'OK' | ||
else | ||
echo 'Failed' | ||
exit 5 | ||
fi | ||
|
||
echo -n "[TEST] Check if Pritunl is installed... " | ||
pritunl version > /dev/null 2>&1 | ||
if [ "$?" -eq "0" ]; then | ||
echo 'OK' | ||
else | ||
echo 'Failed' | ||
exit 6 | ||
fi | ||
|
||
exit 0 |