1
0
mirror of https://github.com/nginxinc/nginx-prometheus-exporter.git synced 2025-07-30 10:03:04 +03:00

Run tests in parallel

This commit is contained in:
Jakub Jarosz
2022-04-01 09:44:14 +01:00
parent 00f3975a7d
commit 7e5213584c
4 changed files with 13 additions and 1 deletions

View File

@ -25,7 +25,7 @@ lint:
.PHONY: test
test:
go test ./...
go test ./... -race -shuffle=on
.PHONY: container
container:

View File

@ -8,6 +8,8 @@ import (
const validStabStats = "Active connections: 1457 \nserver accepts handled requests\n 6717066 6717066 65844359 \nReading: 1 Writing: 8 Waiting: 1448 \n"
func TestParseStubStatsValidInput(t *testing.T) {
t.Parallel()
tests := []struct {
input []byte
expectedResult StubStats

View File

@ -6,6 +6,8 @@ import (
)
func TestMergeLabels(t *testing.T) {
t.Parallel()
tests := []struct {
name string
mapA, mapB, want map[string]string

View File

@ -8,6 +8,8 @@ import (
)
func TestCreateClientWithRetries(t *testing.T) {
t.Parallel()
type args struct {
client interface{}
err error
@ -83,6 +85,8 @@ func TestCreateClientWithRetries(t *testing.T) {
}
func TestParsePositiveDuration(t *testing.T) {
t.Parallel()
tests := []struct {
name string
testInput string
@ -123,6 +127,8 @@ func TestParsePositiveDuration(t *testing.T) {
}
func TestParseUnixSocketAddress(t *testing.T) {
t.Parallel()
tests := []struct {
name string
testInput string
@ -177,6 +183,8 @@ func TestParseUnixSocketAddress(t *testing.T) {
}
func TestParseConstLabels(t *testing.T) {
t.Parallel()
tests := []struct {
name string
labels string