-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some minority fixes in test environment, new test and wrong placement…
… of debug message
- Loading branch information
Showing
6 changed files
with
62 additions
and
1 deletion.
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,11 @@ | ||
version: '3.3' | ||
|
||
services: | ||
test: | ||
image: 'python:3.9' | ||
volumes: | ||
- ../:/workdir | ||
- ./:/develop | ||
command: | ||
- /develop/run-tests.sh | ||
- /workdir |
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,12 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
echo "Entering directory $1" | ||
cd $1/ | ||
|
||
apt-get update | ||
apt-get install -y $(cat tests/system-requirements.txt) | ||
pip install -r requirements.txt | ||
python setup.py install | ||
run-parts --exit-on-error --regex '^[0-9]+.*\.sh$' ./tests/ |
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
File renamed without changes.
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,33 @@ | ||
#!/bin/bash | ||
|
||
cat <<EOF | ||
======================================= | ||
Non existent cert DEPLOY (good to fail) | ||
--------------------------------------- | ||
Check fail states and correct exitcodes | ||
for certs that non exists | ||
======================================= | ||
EOF | ||
|
||
if [[ -f ./vault.env ]] ; then | ||
. ./vault.env | ||
else | ||
echo "Unable to find vault.env file from previous step" | ||
exit 1 | ||
fi | ||
|
||
# Test fail deploy | ||
if $script -c ./script.conf --cert-list deploy4.conf ; then | ||
echo "ERROR: Deploy success when certificate was bad." >&2 | ||
exit 1 | ||
else | ||
echo "It's OK to fail, looks good :)" | ||
fi | ||
|
||
if [[ $(find $cert_destination -type f -name '*.crt' | wc -l) -gt 0 ]] ; then | ||
echo "ERROR: There should be no certificates in this step" >&2 | ||
exit 1 | ||
else | ||
echo "Success, no certificates left in this step" | ||
fi |