mirror of
https://github.com/zokradonh/kopano-docker.git
synced 2026-08-11 16:32:59 +00:00
Add test implementation of goss (#222)
* add test target for goss split test-ci up to later add goss to it * bring back chown of /kopano/data * use a dedicated goss file for kopano-server * add todo
This commit is contained in:
@@ -350,7 +350,10 @@ test-update-env: ## Recreate containers based on updated .env.
|
||||
docker-compose -f $(DOCKERCOMPOSE_FILE) up -d
|
||||
|
||||
.PHONY: test-ci
|
||||
test-ci: ## Test if all containers start up
|
||||
test-ci: test-startup
|
||||
|
||||
.PHONY: test-startup
|
||||
test-startup: ## Test if all containers start up
|
||||
docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml build
|
||||
docker-compose -f $(DOCKERCOMPOSE_FILE) up -d
|
||||
docker-compose -f $(DOCKERCOMPOSE_FILE) ps
|
||||
@@ -362,6 +365,12 @@ test-ci: ## Test if all containers start up
|
||||
docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml stop 2>/dev/null
|
||||
docker ps --filter name=kopano_test* -aq | xargs docker rm -f
|
||||
|
||||
# TODO this needs goss added to travis and dcgoss pulled from my own git repo
|
||||
.PHONY: test-goss
|
||||
test-goss: ## Test configuration of containers with goss
|
||||
GOSS_FILES_PATH=core GOSS_FILE="goss_server.yaml" dcgoss run kopano_server
|
||||
GOSS_FILES_PATH=webapp dcgoss run kopano_webapp
|
||||
|
||||
test-security: ## Scan containers with Trivy for known security risks (not part of CI workflow for now).
|
||||
cat $(TAG_FILE) | xargs -I % sh -c 'trivy --exit-code 0 --severity HIGH --quiet --auto-refresh %'
|
||||
cat $(TAG_FILE) | xargs -I % sh -c 'trivy --exit-code 1 --severity CRITICAL --quiet --auto-refresh %'
|
||||
|
||||
Reference in New Issue
Block a user