[#24] Use build tags to run integration tests

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
Denis Kirillov 2023-03-24 12:25:49 +03:00
parent 81f7168a16
commit 6f35d7198d
8 changed files with 18 additions and 0 deletions

View file

@ -13,6 +13,7 @@ This document outlines major changes between releases.
- Update viper to v1.15.0 (#8) - Update viper to v1.15.0 (#8)
- Errors have become more detailed (#18) - Errors have become more detailed (#18)
- Update system attribute names (#22) - Update system attribute names (#22)
- Separate integration tests with build tags (#24)
### Updating from v0.26.0 ### Updating from v0.26.0

View file

@ -62,6 +62,11 @@ docker/%:
test: test:
@go test ./... -cover @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 # Run tests with race detection and produce coverage output
cover: cover:
@go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic @go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic

View file

@ -1,3 +1,5 @@
//go:build !integration
package downloader package downloader
import ( import (

View file

@ -1,3 +1,5 @@
//go:build integration
package main package main
import ( import (

View file

@ -1,3 +1,5 @@
//go:build !integration
package tokens package tokens
import ( import (

View file

@ -1,3 +1,5 @@
//go:build !integration
package uploader package uploader
import ( import (

View file

@ -1,3 +1,5 @@
//go:build !integration
package uploader package uploader
import ( import (

View file

@ -1,3 +1,5 @@
//go:build !integration
package utils package utils
import ( import (