remove remaining shim runStep functions (#13015)
Wraps up the refactor from #13013
This commit is contained in:
parent
9ad10318cd
commit
c855df87ec
|
@ -2344,12 +2344,6 @@ func TestConfigEntry_ProxyDefaultsExposeConfig(t *testing.T) {
|
||||||
require.Equal(t, expose, proxyConf.Expose)
|
require.Equal(t, expose, proxyConf.Expose)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove this function after all usages have been switched over
|
|
||||||
func runStep(t *testing.T, name string, fn func(t *testing.T)) {
|
|
||||||
t.Helper()
|
|
||||||
testutil.RunStep(t, name, fn)
|
|
||||||
}
|
|
||||||
|
|
||||||
func Test_gateWriteToSecondary(t *testing.T) {
|
func Test_gateWriteToSecondary(t *testing.T) {
|
||||||
type args struct {
|
type args struct {
|
||||||
targetDC string
|
targetDC string
|
||||||
|
|
|
@ -8146,12 +8146,6 @@ func TestStateStore_EnsureService_ServiceNames(t *testing.T) {
|
||||||
require.Empty(t, got)
|
require.Empty(t, got)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove this function after all usages have been switched over
|
|
||||||
func runStep(t *testing.T, name string, fn func(t *testing.T)) {
|
|
||||||
t.Helper()
|
|
||||||
testutil.RunStep(t, name, fn)
|
|
||||||
}
|
|
||||||
|
|
||||||
func assertMaxIndexes(t *testing.T, tx ReadTxn, expect map[string]uint64, skip ...string) {
|
func assertMaxIndexes(t *testing.T, tx ReadTxn, expect map[string]uint64, skip ...string) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
|
|
||||||
|
|
|
@ -495,12 +495,6 @@ func TestEventPublisher_SubscribeWithIndexNotZero_NewSnapshot_WithCache(t *testi
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove this function after all usages have been switched over
|
|
||||||
func runStep(t *testing.T, name string, fn func(t *testing.T)) {
|
|
||||||
t.Helper()
|
|
||||||
testutil.RunStep(t, name, fn)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestEventPublisher_Unsubscribe_ClosesSubscription(t *testing.T) {
|
func TestEventPublisher_Unsubscribe_ClosesSubscription(t *testing.T) {
|
||||||
req := &SubscribeRequest{
|
req := &SubscribeRequest{
|
||||||
Topic: testTopic,
|
Topic: testTopic,
|
||||||
|
|
|
@ -941,12 +941,6 @@ func logError(t *testing.T, f func() error) func() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove this function after all usages have been switched over
|
|
||||||
func runStep(t *testing.T, name string, fn func(t *testing.T)) {
|
|
||||||
t.Helper()
|
|
||||||
testutil.RunStep(t, name, fn)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestNewEventFromSteamEvent(t *testing.T) {
|
func TestNewEventFromSteamEvent(t *testing.T) {
|
||||||
type testCase struct {
|
type testCase struct {
|
||||||
name string
|
name string
|
||||||
|
|
|
@ -4,14 +4,12 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"google.golang.org/grpc/metadata"
|
"google.golang.org/grpc/metadata"
|
||||||
|
|
||||||
"github.com/hashicorp/consul/agent/structs"
|
"github.com/hashicorp/consul/agent/structs"
|
||||||
"github.com/hashicorp/consul/proto/pbpeering"
|
"github.com/hashicorp/consul/proto/pbpeering"
|
||||||
"github.com/hashicorp/consul/sdk/testutil"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// same certificate that appears in our connect tests
|
// same certificate that appears in our connect tests
|
||||||
|
@ -192,9 +190,3 @@ func (t *incrementalTime) Now() time.Time {
|
||||||
t.next++
|
t.next++
|
||||||
return t.base.Add(time.Duration(t.next) * time.Second)
|
return t.base.Add(time.Duration(t.next) * time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove this function after all usages have been switched over
|
|
||||||
func runStep(t *testing.T, name string, fn func(t *testing.T)) {
|
|
||||||
t.Helper()
|
|
||||||
testutil.RunStep(t, name, fn)
|
|
||||||
}
|
|
||||||
|
|
|
@ -667,12 +667,6 @@ func validateNamespace(ns string) func(request *pbsubscribe.SubscribeRequest) er
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove this function after all usages have been switched over
|
|
||||||
func runStep(t *testing.T, name string, fn func(t *testing.T)) {
|
|
||||||
t.Helper()
|
|
||||||
testutil.RunStep(t, name, fn)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestNewFilterEvaluator(t *testing.T) {
|
func TestNewFilterEvaluator(t *testing.T) {
|
||||||
type testCase struct {
|
type testCase struct {
|
||||||
name string
|
name string
|
||||||
|
|
|
@ -505,9 +505,3 @@ func TestStore_Run_ExpiresEntries(t *testing.T) {
|
||||||
require.Len(t, store.byKey, 0)
|
require.Len(t, store.byKey, 0)
|
||||||
require.Equal(t, ttlcache.NotIndexed, e.expiry.Index())
|
require.Equal(t, ttlcache.NotIndexed, e.expiry.Index())
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove this function after all usages have been switched over
|
|
||||||
func runStep(t *testing.T, name string, fn func(t *testing.T)) {
|
|
||||||
t.Helper()
|
|
||||||
testutil.RunStep(t, name, fn)
|
|
||||||
}
|
|
||||||
|
|
|
@ -795,12 +795,6 @@ func makeTestRoute(t *testing.T, fixtureName string) *envoy_route_v3.RouteConfig
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove this function after all usages have been switched over
|
|
||||||
func runStep(t *testing.T, name string, fn func(t *testing.T)) {
|
|
||||||
t.Helper()
|
|
||||||
testutil.RunStep(t, name, fn)
|
|
||||||
}
|
|
||||||
|
|
||||||
func requireProtocolVersionGauge(
|
func requireProtocolVersionGauge(
|
||||||
t *testing.T,
|
t *testing.T,
|
||||||
scenario *testServerScenario,
|
scenario *testServerScenario,
|
||||||
|
|
|
@ -283,12 +283,6 @@ func TestAPI_ConfigEntries(t *testing.T) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove this function after all usages have been switched over
|
|
||||||
func runStep(t *testing.T, name string, fn func(t *testing.T)) {
|
|
||||||
t.Helper()
|
|
||||||
testutil.RunStep(t, name, fn)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestDecodeConfigEntry(t *testing.T) {
|
func TestDecodeConfigEntry(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
|
|
@ -92,9 +92,3 @@ func testMessage(t *testing.T, ch <-chan struct{}) {
|
||||||
t.Fatal("should have a message")
|
t.Fatal("should have a message")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove this function after all usages have been switched over
|
|
||||||
func runStep(t *testing.T, name string, fn func(t *testing.T)) {
|
|
||||||
t.Helper()
|
|
||||||
testutil.RunStep(t, name, fn)
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue