diff --git a/.golangci.yml b/.golangci.yml index 1b3d060f..56729ef3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -22,4 +22,7 @@ issues: # Debug log Sync() error check in defer in main - path: cmd/ghz/main.go - text: "Error return value of `logger.Sync` is not checked" \ No newline at end of file + text: "Error return value of `logger.Sync` is not checked" + + - path: runner/requester.go + text: "SA1019: grpc.WithBalancerName" \ No newline at end of file diff --git a/runner/options_test.go b/runner/options_test.go index 5472f13e..89d26603 100644 --- a/runner/options_test.go +++ b/runner/options_test.go @@ -127,7 +127,7 @@ func TestRunConfig_newRunConfig(t *testing.T) { WithCPUs(4), WithBinaryData([]byte("asdf1234foobar")), WithBinaryDataFunc(changeFunc), - WithClientLoadBalancing(`{"loadBalancingPolicy":"round_robin"}`), + WithClientLoadBalancing("round_robin"), WithMetadataFromFile("../testdata/metadata.json"), WithProtoset("testdata/bundle.protoset"), ) @@ -153,7 +153,7 @@ func TestRunConfig_newRunConfig(t *testing.T) { assert.Equal(t, 4, c.cpus) assert.Equal(t, "asdf", c.name) assert.Equal(t, []byte("asdf1234foobar"), c.data) - assert.Equal(t, `{"loadBalancingPolicy":"round_robin"}`, c.lbStrategy) + assert.Equal(t, "round_robin", c.lbStrategy) funcName1 := runtime.FuncForPC(reflect.ValueOf(changeFunc).Pointer()).Name() funcName2 := runtime.FuncForPC(reflect.ValueOf(c.dataFunc).Pointer()).Name() assert.Equal(t, funcName1, funcName2)