mirror of
https://github.com/adferrand/docker-backuppc.git
synced 2023-11-05 04:40:26 +01:00
Integration tests
This commit is contained in:
parent
8e7674c83f
commit
8a5386db8b
@ -36,11 +36,24 @@ jobs:
|
||||
docker pull adferrand/backuppc || true
|
||||
docker build --pull --cache-from adferrand/backuppc -t adferrand/backuppc .
|
||||
- run:
|
||||
name: Test container
|
||||
name: Test container (unit tests)
|
||||
command: |
|
||||
mkdir -p ./bin
|
||||
curl -fsSL https://goss.rocks/install | GOSS_DST=./bin sh
|
||||
GOSS_PATH=./bin/goss GOSS_SLEEP=1 GOSS_FILES_PATH=./tests ./bin/dgoss run -e LETSENCRYPT_STAGING=true adferrand/backuppc
|
||||
- run:
|
||||
name: Test container (integration tests)
|
||||
command: |
|
||||
docker run --name backuppc-integration --detach adferrand/backuppc
|
||||
sleep 5
|
||||
status=`docker exec backuppc-integration su backuppc -c "/usr/local/BackupPC/bin/BackupPC_serverMesg status"`
|
||||
pattern="Got reply:"" ok"
|
||||
echo "Expect following reply => '$pattern'"
|
||||
grep "$pattern" <(echo $status)
|
||||
output=`curl http://backuppc:password@localhost:8080/BackupPC_Admin`
|
||||
echo "Expect the backupp configuration page without errors"
|
||||
grep "The servers PID is" <(echo $output)
|
||||
docker rm -f backuppc-integration
|
||||
- run:
|
||||
name: Save container
|
||||
command: |
|
||||
|
Loading…
Reference in New Issue
Block a user