Browse Source

remove remaining shim runStep functions (#13015)

Wraps up the refactor from #13013
pull/13027/head
R.B. Boyer 3 years ago committed by GitHub
parent
commit
901fd4dd68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      agent/consul/config_endpoint_test.go
  2. 6
      agent/consul/state/catalog_test.go
  3. 6
      agent/consul/stream/event_publisher_test.go
  4. 6
      agent/grpc/private/services/subscribe/subscribe_test.go
  5. 8
      agent/rpc/peering/testing.go
  6. 6
      agent/rpcclient/health/view_test.go
  7. 6
      agent/submatview/store_test.go
  8. 6
      agent/xds/xds_protocol_helpers_test.go
  9. 6
      api/config_entry_test.go
  10. 6
      lib/ttlcache/eviction_test.go

6
agent/consul/config_endpoint_test.go

@ -2344,12 +2344,6 @@ func TestConfigEntry_ProxyDefaultsExposeConfig(t *testing.T) {
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) {
type args struct {
targetDC string

6
agent/consul/state/catalog_test.go

@ -8146,12 +8146,6 @@ func TestStateStore_EnsureService_ServiceNames(t *testing.T) {
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) {
t.Helper()

6
agent/consul/stream/event_publisher_test.go

@ -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) {
req := &SubscribeRequest{
Topic: testTopic,

6
agent/grpc/private/services/subscribe/subscribe_test.go

@ -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) {
type testCase struct {
name string

8
agent/rpc/peering/testing.go

@ -4,14 +4,12 @@ import (
"context"
"io"
"sync"
"testing"
"time"
"google.golang.org/grpc/metadata"
"github.com/hashicorp/consul/agent/structs"
"github.com/hashicorp/consul/proto/pbpeering"
"github.com/hashicorp/consul/sdk/testutil"
)
// same certificate that appears in our connect tests
@ -192,9 +190,3 @@ func (t *incrementalTime) Now() time.Time {
t.next++
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)
}

6
agent/rpcclient/health/view_test.go

@ -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) {
type testCase struct {
name string

6
agent/submatview/store_test.go

@ -505,9 +505,3 @@ func TestStore_Run_ExpiresEntries(t *testing.T) {
require.Len(t, store.byKey, 0)
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)
}

6
agent/xds/xds_protocol_helpers_test.go

@ -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(
t *testing.T,
scenario *testServerScenario,

6
api/config_entry_test.go

@ -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) {
t.Parallel()

6
lib/ttlcache/eviction_test.go vendored

@ -92,9 +92,3 @@ func testMessage(t *testing.T, ch <-chan struct{}) {
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…
Cancel
Save