Skip to content

Commit

Permalink
remove suitName constants
Browse files Browse the repository at this point in the history
  • Loading branch information
schrej committed Aug 25, 2022
1 parent 8060863 commit 30c1f85
Show file tree
Hide file tree
Showing 36 changed files with 38 additions and 109 deletions.
4 changes: 1 addition & 3 deletions pkg/builder/builder_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/webhook"
)

const suiteName = "application Suite"

func TestBuilder(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "application Suite")
}

var testenv *envtest.Environment
Expand Down
4 changes: 1 addition & 3 deletions pkg/cache/cache_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "Cache Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Cache Suite")
}

var testenv *envtest.Environment
Expand Down
4 changes: 1 addition & 3 deletions pkg/cache/internal/internal_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import (
. "github.com/onsi/gomega"
)

const suiteName = "Cache Internal Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Cache Internal Suite")
}
7 changes: 3 additions & 4 deletions pkg/certwatcher/certwatcher_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ import (
)

var (
certPath = "testdata/tls.crt"
keyPath = "testdata/tls.key"
suiteName = "CertWatcher Suite"
certPath = "testdata/tls.crt"
keyPath = "testdata/tls.key"
)

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "CertWatcher Suite")
}

var _ = BeforeSuite(func() {
Expand Down
4 changes: 1 addition & 3 deletions pkg/client/apiutil/apiutil_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "API Utilities Test Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "API Utilities Test Suite")
}

var cfg *rest.Config
Expand Down
4 changes: 1 addition & 3 deletions pkg/client/client_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "Client Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Client Suite")
}

var testenv *envtest.Environment
Expand Down
4 changes: 1 addition & 3 deletions pkg/client/config/config_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "Client Config Test Suite"

func TestConfig(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Client Config Test Suite")
}

var _ = BeforeSuite(func() {
Expand Down
4 changes: 1 addition & 3 deletions pkg/client/fake/client_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "Fake client Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Fake client Suite")
}

var _ = BeforeSuite(func() {
Expand Down
4 changes: 1 addition & 3 deletions pkg/cluster/cluster_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "Cluster Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Cluster Suite")
}

var testenv *envtest.Environment
Expand Down
4 changes: 1 addition & 3 deletions pkg/config/config_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import (
. "github.com/onsi/gomega"
)

const suiteName = "Config Suite"

func TestScheme(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Config Suite")
}
4 changes: 1 addition & 3 deletions pkg/controller/controller_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ import (
crscheme "sigs.k8s.io/controller-runtime/pkg/scheme"
)

const suiteName = "Controller Integration Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Controller Integration Suite")
}

var testenv *envtest.Environment
Expand Down
4 changes: 1 addition & 3 deletions pkg/controller/controllerutil/controllerutil_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/envtest"
)

const suiteName = "Controllerutil Suite"

func TestControllerutil(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Controllerutil Suite")
}

var testenv *envtest.Environment
Expand Down
4 changes: 1 addition & 3 deletions pkg/envtest/envtest_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "Envtest Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Envtest Suite")
}

var env *Environment
Expand Down
4 changes: 1 addition & 3 deletions pkg/finalizer/finalizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ func (f mockFinalizer) Finalize(context.Context, client.Object) (Result, error)
return f.result, f.err
}

const suiteName = "Finalizer Suite"

func TestFinalizer(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Finalizer Suite")
}

var _ = Describe("TestFinalizer", func() {
Expand Down
4 changes: 1 addition & 3 deletions pkg/handler/eventhandler_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "Eventhandler Suite"

func TestEventhandler(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Eventhandler Suite")
}

var testenv *envtest.Environment
Expand Down
4 changes: 1 addition & 3 deletions pkg/healthz/healthz_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "Healthz Suite"

func TestHealthz(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Healthz Suite")
}

var _ = BeforeSuite(func() {
Expand Down
4 changes: 1 addition & 3 deletions pkg/internal/controller/controller_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "Controller internal Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Controller internal Suite")
}

var testenv *envtest.Environment
Expand Down
4 changes: 1 addition & 3 deletions pkg/internal/recorder/recorder_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "Recorder Integration Suite"

func TestRecorder(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Recorder Integration Suite")
}

var testenv *envtest.Environment
Expand Down
4 changes: 1 addition & 3 deletions pkg/internal/testing/addr/addr_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ import (
. "github.com/onsi/gomega"
)

const suiteName = "Addr Suite"

func TestAddr(t *testing.T) {
t.Parallel()
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Addr Suite")
}
4 changes: 1 addition & 3 deletions pkg/internal/testing/certs/certs_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ import (
. "github.com/onsi/gomega"
)

const suiteName = "TinyCA (Internal Certs) Suite"

func TestInternal(t *testing.T) {
t.Parallel()
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "TinyCA (Internal Certs) Suite")
}
4 changes: 1 addition & 3 deletions pkg/internal/testing/controlplane/controlplane_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ import (
. "github.com/onsi/gomega"
)

const suiteName = "Control Plane Standup Unit Tests"

func TestIntegration(t *testing.T) {
t.Parallel()
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Control Plane Standup Unit Tests")
}
4 changes: 1 addition & 3 deletions pkg/internal/testing/process/process_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ import (
. "github.com/onsi/gomega"
)

const suiteName = "Envtest Process Launcher Suite"

func TestInternal(t *testing.T) {
t.Parallel()
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Envtest Process Launcher Suite")
}
4 changes: 1 addition & 3 deletions pkg/log/log_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import (
. "github.com/onsi/gomega"
)

const suiteName = "Log Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Log Suite")
}
4 changes: 1 addition & 3 deletions pkg/log/zap/zap_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import (
. "github.com/onsi/gomega"
)

const suiteName = "Zap Log Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Zap Log Suite")
}
4 changes: 1 addition & 3 deletions pkg/manager/manager_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/metrics"
)

const suiteName = "Manager Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Manager Suite")
}

var testenv *envtest.Environment
Expand Down
4 changes: 1 addition & 3 deletions pkg/manager/signals/signals_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ import (
. "github.com/onsi/gomega"
)

const suiteName = "Runtime Signal Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Runtime Signal Suite")
}

var _ = BeforeSuite(func() {
Expand Down
4 changes: 1 addition & 3 deletions pkg/predicate/predicate_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "Predicate Suite"

func TestPredicate(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Predicate Suite")
}

var _ = BeforeSuite(func() {
Expand Down
4 changes: 1 addition & 3 deletions pkg/reconcile/reconcile_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "Reconcile Suite"

func TestReconcile(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Reconcile Suite")
}

var _ = BeforeSuite(func() {
Expand Down
4 changes: 1 addition & 3 deletions pkg/runtime/inject/inject_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import (
. "github.com/onsi/gomega"
)

const suiteName = "Runtime Injection Suite"

func TestSource(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Runtime Injection Suite")
}
4 changes: 1 addition & 3 deletions pkg/scheme/scheme_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import (
. "github.com/onsi/gomega"
)

const suiteName = "Scheme Suite"

func TestScheme(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Scheme Suite")
}
4 changes: 1 addition & 3 deletions pkg/source/internal/internal_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)

const suiteName = "Source Internal Suite"

func TestInternal(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, suiteName)
RunSpecs(t, "Source Internal Suite")
}

var _ = BeforeSuite(func() {
Expand Down
Loading

0 comments on commit 30c1f85

Please sign in to comment.