diff options
author | 2019-10-01 10:12:10 +0330 | |
---|---|---|
committer | 2019-10-01 07:42:10 +0100 | |
commit | 4ffbee299a751591ae98d7f07d3c721b819906c1 (patch) | |
tree | 8bcdddb3d71ba4a6b755f3352a44a7693e01fc65 /test | |
parent | dbd1c047cb973fc669fbe4e97dc12e7b3d3e6ed8 (diff) | |
download | coredns-4ffbee299a751591ae98d7f07d3c721b819906c1.tar.gz coredns-4ffbee299a751591ae98d7f07d3c721b819906c1.tar.zst coredns-4ffbee299a751591ae98d7f07d3c721b819906c1.zip |
Remove deprecated function calls flagged by staticcheck (#3333)
* Use session.NewSession instead of session.New
Signed-off-by: Erfan Besharat <erbesharat@gmail.com>
* Use grpc.DialContext instead of grpc.WithTimeout
Signed-off-by: Erfan Besharat <erbesharat@gmail.com>
* Pass non-nil context to context.WithTimeout
Signed-off-by: Erfan Besharat <erbesharat@gmail.com>
* Return the error directly in route53 setup
Co-Authored-By: Miek Gieben <miek@miek.nl>
Signed-off-by: Erfan Besharat <erbesharat@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/grpc_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/grpc_test.go b/test/grpc_test.go index fe273e789..a0d48490d 100644 --- a/test/grpc_test.go +++ b/test/grpc_test.go @@ -22,7 +22,8 @@ func TestGrpc(t *testing.T) { } defer g.Stop() - conn, err := grpc.Dial(tcp, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithTimeout(5*time.Second)) + ctx, _ := context.WithTimeout(context.Background(), 5*time.Second) + conn, err := grpc.DialContext(ctx, tcp, grpc.WithInsecure(), grpc.WithBlock()) if err != nil { t.Fatalf("Expected no error but got: %s", err) } |