Skip to content

Commit

Permalink
chore: Lint the test files
Browse files Browse the repository at this point in the history
  • Loading branch information
laynax committed Jul 25, 2024
1 parent 281c1b2 commit 050c50f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions pkg/interceptors/request_id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var (
)

func TestRequestIDUnaryServerInterceptor(t *testing.T) {
const testString = "test"
testRequestID := newRequestID()

tests := []struct {
Expand All @@ -36,7 +37,7 @@ func TestRequestIDUnaryServerInterceptor(t *testing.T) {

assert.NotEmpty(t, requestID)

return "test", nil
return testString, nil
},
},
{
Expand All @@ -53,7 +54,7 @@ func TestRequestIDUnaryServerInterceptor(t *testing.T) {

assert.Equal(t, testRequestID, requestID)

return "test", nil
return testString, nil
},
},
}
Expand All @@ -62,7 +63,7 @@ func TestRequestIDUnaryServerInterceptor(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
ctx := tt.set()

_, err := RequestIDUnaryServerInterceptor()(ctx, "test", unaryInfo, tt.handler)
_, err := RequestIDUnaryServerInterceptor()(ctx, testString, unaryInfo, tt.handler)
assert.NoError(t, err)
})
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/interceptors/statsig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func TestExperimentUnaryServerInterceptor(t *testing.T) {
testString := "test"
const testString = "test"

handler := func(ctx context.Context, req interface{}) (interface{}, error) {
_, err := sdkstatsigcontext.ExtractExperiment(ctx)
Expand All @@ -24,7 +24,7 @@ func TestExperimentUnaryServerInterceptor(t *testing.T) {
assert.NoError(t, err)
}
func TestExperimentStreamServerInterceptor(t *testing.T) {
testString := "test"
const testString = "test"

testStream := &testServerStream{ctx: context.Background()}
handler := func(srv interface{}, stream grpc.ServerStream) error {
Expand All @@ -38,7 +38,7 @@ func TestExperimentStreamServerInterceptor(t *testing.T) {
}

func TestFeatureFlagUnaryServerInterceptor(t *testing.T) {
testString := "test"
const testString = "test"

handler := func(ctx context.Context, req interface{}) (interface{}, error) {
_, err := sdkstatsigcontext.ExtractFeatureFlag(ctx)
Expand All @@ -52,7 +52,7 @@ func TestFeatureFlagUnaryServerInterceptor(t *testing.T) {
}

func TestFeatureFlagStreamServerInterceptor(t *testing.T) {
testString := "test"
const testString = "test"

testStream := &testServerStream{ctx: context.Background()}
handler := func(srv interface{}, stream grpc.ServerStream) error {
Expand Down

0 comments on commit 050c50f

Please sign in to comment.