diff --git a/.circleci/config.yml b/.circleci/config.yml index 3de2796..8d73a5a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: |