From 25a55a9712447c9745c7ea6856f9018062d8c894 Mon Sep 17 00:00:00 2001 From: sighphyre Date: Fri, 8 Dec 2023 16:19:42 +0200 Subject: [PATCH] restore a bunch of files so we can have a smaller diff --- context/context_test.go | 3 +-- internal/constraints/check_test.go | 3 +-- internal/constraints/operator_date_test.go | 5 ++--- internal/constraints/operator_in_test.go | 3 +-- internal/constraints/operator_num_test.go | 3 +-- internal/constraints/operator_semver_test.go | 3 +-- internal/constraints/operator_str_test.go | 3 +-- internal/strategies/application_hostname_test.go | 5 ++--- internal/strategies/default_test.go | 3 +-- internal/strategies/gradual_rollout_random_test.go | 5 ++--- internal/strategies/gradual_rollout_session_id_test.go | 6 ++---- internal/strategies/gradual_rollout_user_id_test.go | 6 ++---- internal/strategies/helpers_test.go | 3 --- internal/strategies/remote_address_test.go | 6 +----- internal/strategies/user_with_id_test.go | 6 +----- 15 files changed, 19 insertions(+), 44 deletions(-) diff --git a/context/context_test.go b/context/context_test.go index 8fba06b..7deaa08 100644 --- a/context/context_test.go +++ b/context/context_test.go @@ -1,9 +1,8 @@ package context import ( - "testing" - "github.com/stretchr/testify/assert" + "testing" ) func TestOverride(t *testing.T) { diff --git a/internal/constraints/check_test.go b/internal/constraints/check_test.go index e9b58e8..aa176be 100644 --- a/internal/constraints/check_test.go +++ b/internal/constraints/check_test.go @@ -2,11 +2,10 @@ package constraints import ( "fmt" - "testing" - "github.com/Unleash/unleash-client-go/v4/api" "github.com/Unleash/unleash-client-go/v4/context" "github.com/stretchr/testify/assert" + "testing" ) type checkTestCase struct { diff --git a/internal/constraints/operator_date_test.go b/internal/constraints/operator_date_test.go index 873992c..4da0474 100644 --- a/internal/constraints/operator_date_test.go +++ b/internal/constraints/operator_date_test.go @@ -1,12 +1,11 @@ package constraints import ( - "testing" - "time" - "github.com/Unleash/unleash-client-go/v4/api" "github.com/Unleash/unleash-client-go/v4/context" "github.com/stretchr/testify/assert" + "testing" + "time" ) func TestOperatorDate(t *testing.T) { diff --git a/internal/constraints/operator_in_test.go b/internal/constraints/operator_in_test.go index c4b33da..5a86773 100644 --- a/internal/constraints/operator_in_test.go +++ b/internal/constraints/operator_in_test.go @@ -1,11 +1,10 @@ package constraints import ( - "testing" - "github.com/Unleash/unleash-client-go/v4/api" "github.com/Unleash/unleash-client-go/v4/context" "github.com/stretchr/testify/assert" + "testing" ) func TestOperatorIn(t *testing.T) { diff --git a/internal/constraints/operator_num_test.go b/internal/constraints/operator_num_test.go index 51237f9..73635dc 100644 --- a/internal/constraints/operator_num_test.go +++ b/internal/constraints/operator_num_test.go @@ -1,11 +1,10 @@ package constraints import ( - "testing" - "github.com/Unleash/unleash-client-go/v4/api" "github.com/Unleash/unleash-client-go/v4/context" "github.com/stretchr/testify/assert" + "testing" ) func TestOperatorNum(t *testing.T) { diff --git a/internal/constraints/operator_semver_test.go b/internal/constraints/operator_semver_test.go index 596724d..65a76ad 100644 --- a/internal/constraints/operator_semver_test.go +++ b/internal/constraints/operator_semver_test.go @@ -1,11 +1,10 @@ package constraints import ( - "testing" - "github.com/Unleash/unleash-client-go/v4/api" "github.com/Unleash/unleash-client-go/v4/context" "github.com/stretchr/testify/assert" + "testing" ) func TestOperatorSemver(t *testing.T) { diff --git a/internal/constraints/operator_str_test.go b/internal/constraints/operator_str_test.go index d7fef23..2ec0511 100644 --- a/internal/constraints/operator_str_test.go +++ b/internal/constraints/operator_str_test.go @@ -1,11 +1,10 @@ package constraints import ( - "testing" - "github.com/Unleash/unleash-client-go/v4/api" "github.com/Unleash/unleash-client-go/v4/context" "github.com/stretchr/testify/assert" + "testing" ) func TestOperatorStr(t *testing.T) { diff --git a/internal/strategies/application_hostname_test.go b/internal/strategies/application_hostname_test.go index 14b9529..6a1ad4e 100644 --- a/internal/strategies/application_hostname_test.go +++ b/internal/strategies/application_hostname_test.go @@ -1,12 +1,11 @@ package strategies import ( - "os" - "testing" - "github.com/Unleash/unleash-client-go/v4/context" "github.com/Unleash/unleash-client-go/v4/strategy" "github.com/stretchr/testify/assert" + "os" + "testing" ) func TestApplicationHostnameStrategy_Name(t *testing.T) { diff --git a/internal/strategies/default_test.go b/internal/strategies/default_test.go index cb1d86a..d2be934 100644 --- a/internal/strategies/default_test.go +++ b/internal/strategies/default_test.go @@ -1,9 +1,8 @@ package strategies import ( - "testing" - "github.com/stretchr/testify/assert" + "testing" ) func TestDefaultStrategy_Name(t *testing.T) { diff --git a/internal/strategies/gradual_rollout_random_test.go b/internal/strategies/gradual_rollout_random_test.go index 5b01c10..a0e9790 100644 --- a/internal/strategies/gradual_rollout_random_test.go +++ b/internal/strategies/gradual_rollout_random_test.go @@ -3,12 +3,11 @@ package strategies import ( - "strconv" - "testing" - "github.com/Unleash/unleash-client-go/v4/context" "github.com/Unleash/unleash-client-go/v4/strategy" "github.com/stretchr/testify/assert" + "strconv" + "testing" ) func TestGradualRolloutRandomStrategy_Name(t *testing.T) { diff --git a/internal/strategies/gradual_rollout_session_id_test.go b/internal/strategies/gradual_rollout_session_id_test.go index 87113cd..0d9ef0c 100644 --- a/internal/strategies/gradual_rollout_session_id_test.go +++ b/internal/strategies/gradual_rollout_session_id_test.go @@ -1,15 +1,13 @@ -//go:build norace // +build norace package strategies import ( - "strconv" - "testing" - "github.com/Unleash/unleash-client-go/v4/context" "github.com/Unleash/unleash-client-go/v4/strategy" "github.com/stretchr/testify/assert" + "strconv" + "testing" ) func TestGradualRolloutSessionId_Name(t *testing.T) { diff --git a/internal/strategies/gradual_rollout_user_id_test.go b/internal/strategies/gradual_rollout_user_id_test.go index 9819b3e..d14d58e 100644 --- a/internal/strategies/gradual_rollout_user_id_test.go +++ b/internal/strategies/gradual_rollout_user_id_test.go @@ -1,15 +1,13 @@ -//go:build norace // +build norace package strategies import ( - "strconv" - "testing" - "github.com/Unleash/unleash-client-go/v4/context" "github.com/Unleash/unleash-client-go/v4/strategy" "github.com/stretchr/testify/assert" + "strconv" + "testing" ) func TestGradualRolloutUserId_Name(t *testing.T) { diff --git a/internal/strategies/helpers_test.go b/internal/strategies/helpers_test.go index bc77de2..fe24e38 100644 --- a/internal/strategies/helpers_test.go +++ b/internal/strategies/helpers_test.go @@ -1,6 +1,3 @@ -//go:build norace -// +build norace - package strategies import ( diff --git a/internal/strategies/remote_address_test.go b/internal/strategies/remote_address_test.go index 5845be2..fb5e04d 100644 --- a/internal/strategies/remote_address_test.go +++ b/internal/strategies/remote_address_test.go @@ -1,14 +1,10 @@ -//go:build norace -// +build norace - package strategies import ( - "testing" - "github.com/Unleash/unleash-client-go/v4/context" "github.com/Unleash/unleash-client-go/v4/strategy" "github.com/stretchr/testify/assert" + "testing" ) func TestRemoteAddressStrategy_Name(t *testing.T) { diff --git a/internal/strategies/user_with_id_test.go b/internal/strategies/user_with_id_test.go index 9e56e4b..3f22835 100644 --- a/internal/strategies/user_with_id_test.go +++ b/internal/strategies/user_with_id_test.go @@ -1,14 +1,10 @@ -//go:build norace -// +build norace - package strategies import ( - "testing" - "github.com/Unleash/unleash-client-go/v4/context" "github.com/Unleash/unleash-client-go/v4/strategy" "github.com/stretchr/testify/assert" + "testing" ) func TestUserWithIdStrategy_Name(t *testing.T) {