diff --git a/CHANGELOG.md b/CHANGELOG.md index e3c86db5..1dcd4562 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ This document outlines major changes between releases. - Update viper to v1.15.0 (#8) - Errors have become more detailed (#18) - Update system attribute names (#22) +- Separate integration tests with build tags (#24) ### Updating from v0.26.0 diff --git a/Makefile b/Makefile index 0fccc4e6..a4bdb1e9 100644 --- a/Makefile +++ b/Makefile @@ -62,6 +62,11 @@ docker/%: test: @go test ./... -cover +# Run integration tests +.PHONY: integration-test +integration-test: + @go test ./... -cover --tags=integration + # Run tests with race detection and produce coverage output cover: @go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic diff --git a/downloader/reader_test.go b/downloader/reader_test.go index 8d58185d..09c990a8 100644 --- a/downloader/reader_test.go +++ b/downloader/reader_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package downloader import ( diff --git a/integration_test.go b/integration_test.go index 40d908b3..7a170a30 100644 --- a/integration_test.go +++ b/integration_test.go @@ -1,3 +1,5 @@ +//go:build integration + package main import ( diff --git a/tokens/bearer-token_test.go b/tokens/bearer-token_test.go index b03147cb..d5706cc0 100644 --- a/tokens/bearer-token_test.go +++ b/tokens/bearer-token_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package tokens import ( diff --git a/uploader/filter_test.go b/uploader/filter_test.go index 1190001c..9d32b84a 100644 --- a/uploader/filter_test.go +++ b/uploader/filter_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package uploader import ( diff --git a/uploader/multipart_test.go b/uploader/multipart_test.go index 9763f88c..aad2b665 100644 --- a/uploader/multipart_test.go +++ b/uploader/multipart_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package uploader import ( diff --git a/utils/attributes_test.go b/utils/attributes_test.go index a903b60f..251113bc 100644 --- a/utils/attributes_test.go +++ b/utils/attributes_test.go @@ -1,3 +1,5 @@ +//go:build !integration + package utils import (