From ea5a87ec253f0c21f2d1a285bde29f21c10e1743 Mon Sep 17 00:00:00 2001 From: Fabian Ponce Date: Wed, 25 Sep 2024 12:06:47 -0400 Subject: [PATCH] test: resolve remaining linter errors on build (#78) --- .golangci.yml | 8 ++++++++ proxy/proxy_test.go | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .golangci.yml diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..34e6b9b --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,8 @@ +issues: + exclude-rules: + # these operations are deprecated, and we properly parse the replacement message type, but + # support remains for the deprecated form of encoding + - path: mongo/operations.go + text: "SA1019: wiremessage.ReadQuery" + - path: mongo/operations.go + text: "SA1019: wiremessage.OpQuery" diff --git a/proxy/proxy_test.go b/proxy/proxy_test.go index 17f3176..7a30d55 100644 --- a/proxy/proxy_test.go +++ b/proxy/proxy_test.go @@ -108,7 +108,7 @@ func TestProxyUnacknowledgedWrites(t *testing.T) { // Create two *Collection instances: one for setup and basic operations and and one configured with an // unacknowledged write concern for testing. - wc := writeconcern.New(writeconcern.W(0)) + wc := writeconcern.Unacknowledged() setupCollection := client.Database("test").Collection("test_proxy_unacknowledged_writes") unackCollection, err := setupCollection.Clone(options.Collection().SetWriteConcern(wc)) assert.Nil(t, err)