fix system tests

- use s3 mirror instead of internet download
- reduce download verbosity
- do not use venv in docker-system-tests
- be more verbose on test output
- do not run golangci-lint in system-tests
This commit is contained in:
André Roth
2024-04-10 19:41:38 +02:00
parent 6be4f5e8d0
commit 9deb031c44
61 changed files with 646 additions and 1183 deletions
+7 -4
View File
@@ -33,7 +33,6 @@ dev:
check: system/env
ifeq ($(RUN_LONG_TESTS), yes)
golangci-lint run
system/env/bin/flake8
endif
@@ -57,6 +56,10 @@ ifeq ($(RUN_LONG_TESTS), yes)
PATH=$(BINPATH)/:$(PATH) && . system/env/bin/activate && APTLY_VERSION=$(VERSION) $(PYTHON) system/run.py --long $(TESTS) --coverage-dir $(COVERAGE_DIR) $(CAPTURE)
endif
docker-test: install
go test -v -coverpkg="./..." -c -tags testruncli
PATH=$(BINPATH)/:$(PATH) APTLY_VERSION=$(VERSION) $(PYTHON) system/run.py --long $(TESTS) --coverage-dir $(COVERAGE_DIR) $(CAPTURE) $(TEST)
test:
go test -v ./... -gocheck.v=true -coverprofile=unit.out
@@ -90,10 +93,10 @@ version: ## Print aptly version
@echo $(VERSION)
docker-build-system-tests: ## Build system-test docker image
docker build -f system/Dockerfile . -t aptly-system-test
docker build -f system/Dockerfile --no-cache . -t aptly-system-test
docker-system-tests: ## Run system tests in docker container
docker run -t --rm -v ${PWD}:/app aptly-system-test
docker-system-tests: ## Run system tests in docker container (add TEST=t04_mirror to run only specific tests)
docker run -t --rm -v ${PWD}:/app aptly-system-test /app/system/run-system-tests $(TEST)
golangci-lint: ## Run golangci-line in docker container
docker run -t --rm -v ~/.cache/golangci-lint/v1.56.2:/root/.cache -v ${PWD}:/app -w /app golangci/golangci-lint:v1.56.2 golangci-lint run