feat: add tests tags

This commit is contained in:
hubert.lenoir
2025-11-04 13:59:26 +01:00
committed by Julien Neuhart
parent d5a58cfcb5
commit f4d3fba306
2 changed files with 5 additions and 2 deletions

View File

@@ -160,12 +160,13 @@ PLATFORM=
NO_CONCURRENCY=false NO_CONCURRENCY=false
.PHONY: test-integration .PHONY: test-integration
test-integration: ## Run integration tests test-integration: ## Run integration tests, use TAGS environment variable to filter tests by tags
go test -timeout 40m -tags=integration -v github.com/gotenberg/gotenberg/v8/test/integration -args \ go test -timeout 40m -tags=integration -v github.com/gotenberg/gotenberg/v8/test/integration -args \
--gotenberg-docker-repository=$(DOCKER_REPOSITORY) \ --gotenberg-docker-repository=$(DOCKER_REPOSITORY) \
--gotenberg-version=$(GOTENBERG_VERSION) \ --gotenberg-version=$(GOTENBERG_VERSION) \
--gotenberg-container-platform=$(PLATFORM) \ --gotenberg-container-platform=$(PLATFORM) \
--no-concurrency=$(NO_CONCURRENCY) --no-concurrency=$(NO_CONCURRENCY) \
--tags="$(TAGS)"
.PHONY: lint .PHONY: lint
lint: ## Lint Golang codebase lint: ## Lint Golang codebase

View File

@@ -19,6 +19,7 @@ func TestMain(m *testing.M) {
version := flag.String("gotenberg-version", "", "") version := flag.String("gotenberg-version", "", "")
platform := flag.String("gotenberg-container-platform", "", "") platform := flag.String("gotenberg-container-platform", "", "")
noConcurrency := flag.Bool("no-concurrency", false, "") noConcurrency := flag.Bool("no-concurrency", false, "")
tags := flag.String("tags", "", "")
flag.Parse() flag.Parse()
if *platform == "" { if *platform == "" {
@@ -47,6 +48,7 @@ func TestMain(m *testing.M) {
Paths: []string{"features"}, Paths: []string{"features"},
Output: colors.Colored(os.Stdout), Output: colors.Colored(os.Stdout),
Concurrency: concurrency, Concurrency: concurrency,
Tags: *tags,
}, },
}.Run() }.Run()