From fafdb28907754f100bce955707eede62905fa2e6 Mon Sep 17 00:00:00 2001 From: Bob Stasyszyn Date: Mon, 2 Oct 2023 12:41:37 -0400 Subject: [PATCH] chore: Bump versions of aries-framework-go-ext and golang-ci Signed-off-by: Bob Stasyszyn --- .golangci.yml | 1 + Makefile | 2 +- cmd/orb-cli/common/common.go | 2 +- cmd/orb-cli/createdidcmd/createdid.go | 2 +- cmd/orb-cli/go.mod | 9 ++-- cmd/orb-cli/go.sum | 14 +++--- cmd/orb-cli/recoverdidcmd/recoverdid.go | 2 +- cmd/orb-cli/updatedidcmd/updatedid.go | 4 +- cmd/orb-driver/go.mod | 9 ++-- cmd/orb-driver/go.sum | 14 +++--- cmd/orb-server/go.mod | 4 +- cmd/orb-server/go.sum | 8 +-- go.mod | 2 +- go.sum | 4 +- pkg/activitypub/client/client_test.go | 2 +- pkg/activitypub/httpsig/algorithm_test.go | 2 +- .../resthandler/acceptlisthandler_test.go | 18 +++---- .../resthandler/activityhandler_test.go | 50 +++++++++---------- .../resthandler/authhandler_test.go | 16 +++--- .../resthandler/outboxhandler_test.go | 2 +- .../resthandler/referencehandler_test.go | 18 +++---- .../resthandler/serviceshandler_test.go | 16 +++--- .../httpsubscriber/httpsubscriber_test.go | 14 +++--- pkg/activitypub/service/service_test.go | 2 +- .../allowedoriginshandler_test.go | 12 ++--- .../policy/resthandler/configurator_test.go | 6 +-- .../policy/resthandler/retriever_test.go | 6 +-- .../policy/selector/random/selector.go | 2 +- pkg/httpserver/auth/authwrapper_test.go | 4 +- pkg/httpserver/auth/tokenverifier_test.go | 8 +-- pkg/httpserver/maintenance/mode_test.go | 2 +- pkg/nodeinfo/handler_test.go | 4 +- pkg/observability/loglevels/loglevels_test.go | 6 +-- .../versions/test/v_test/client/client.go | 2 +- pkg/util/util.go | 2 +- pkg/util/util_test.go | 2 +- pkg/vct/logmonitoring/monitor_test.go | 2 +- .../resthandler/retriever_test.go | 14 +++--- .../logmonitoring/resthandler/update_test.go | 12 ++--- pkg/vct/resthandler/configurator_test.go | 12 ++--- pkg/vct/resthandler/retriever_test.go | 8 +-- pkg/webcas/webcas_internal_test.go | 6 +-- pkg/webfinger/client/client_test.go | 6 +-- scripts/build-cli.sh | 2 +- scripts/check_lint.sh | 2 +- scripts/unit.sh | 2 +- test/bdd/go.mod | 10 ++-- test/bdd/go.sum | 14 +++--- test/bdd/httpclient.go | 2 +- test/bdd/stress_steps.go | 2 +- 50 files changed, 182 insertions(+), 185 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 43c448038..d6fe40b03 100755 --- a/.golangci.yml +++ b/.golangci.yml @@ -136,6 +136,7 @@ linters: - nosnakecase - interfacer - golint + - depguard issues: # Excluding configuration per-path, per-linter, per-text and per-source diff --git a/Makefile b/Makefile index a9257581b..e74677cfa 100755 --- a/Makefile +++ b/Makefile @@ -132,7 +132,7 @@ build-orb-cli-binaries: @docker run -i --rm \ -v $(abspath .):/opt/workspace/orb \ --entrypoint "/opt/workspace/orb/scripts/build-cli.sh" \ - ghcr.io/gythialy/golang-cross:go-1.18 + ghcr.io/gythialy/golang-cross:1.21.1 .PHONY: extract-orb-cli-binaries extract-orb-cli-binaries: diff --git a/cmd/orb-cli/common/common.go b/cmd/orb-cli/common/common.go index 21e2fff94..e039a72c6 100644 --- a/cmd/orb-cli/common/common.go +++ b/cmd/orb-cli/common/common.go @@ -207,7 +207,7 @@ func GetPublicKeyFromKMS(cmd *cobra.Command, keyIDFlagName, keyIDEnvKey string, kms.ECDSAP521IEEEP1363: elliptic.P521(), } crv := curves[kt] - x, y := elliptic.Unmarshal(crv, keyBytes) + x, y := elliptic.Unmarshal(crv, keyBytes) //nolint:staticcheck return &ecdsa.PublicKey{ Curve: crv, diff --git a/cmd/orb-cli/createdidcmd/createdid.go b/cmd/orb-cli/createdidcmd/createdid.go index 7515fa071..097ef0fe4 100644 --- a/cmd/orb-cli/createdidcmd/createdid.go +++ b/cmd/orb-cli/createdidcmd/createdid.go @@ -72,7 +72,7 @@ const ( " Alternatively, this can be set with the following environment variable: " + recoveryKeyEnvKey recoveryKeyFileFlagName = "recoverykey-file" - recoveryKeyFileEnvKey = "ORB_CLI_RECOVERYKEY_FILE" + recoveryKeyFileEnvKey = "ORB_CLI_RECOVERYKEY_FILE" //nolint:gosec recoveryKeyFileFlagUsage = "The file that contains the public key PEM used for recovery of the document." + " Alternatively, this can be set with the following environment variable: " + recoveryKeyFileEnvKey diff --git a/cmd/orb-cli/go.mod b/cmd/orb-cli/go.mod index d1a6be2da..448d9a562 100644 --- a/cmd/orb-cli/go.mod +++ b/cmd/orb-cli/go.mod @@ -12,8 +12,8 @@ require ( github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce github.com/google/uuid v1.3.0 github.com/hyperledger/aries-framework-go v0.3.3-0.20230901120639-e17eddd3ad3e - github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20230612123444-d285f3c85595 - github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20230612123444-d285f3c85595 + github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20231002134513-a3b96bcbb37c + github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20231002134513-a3b96bcbb37c github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20230901120639-e17eddd3ad3e github.com/ipfs/go-ipfs-api v0.2.0 github.com/ipfs/go-ipfs-files v0.0.8 @@ -22,7 +22,7 @@ require ( github.com/spf13/cobra v1.5.0 github.com/stretchr/testify v1.8.2 github.com/trustbloc/logutil-go v1.0.0-rc1 - github.com/trustbloc/orb v1.0.0-rc7 + github.com/trustbloc/orb v1.0.1-0.20230929144409-1e0e7e685841 github.com/trustbloc/sidetree-go v0.0.0-20230928172705-30e78b6b6ddd github.com/trustbloc/vct v1.0.0 ) @@ -51,7 +51,7 @@ require ( github.com/google/tink/go v1.7.0 // indirect github.com/google/trillian v1.3.14-0.20210520152752-ceda464a95a3 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf // indirect + github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c // indirect github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230901120639-e17eddd3ad3e // indirect github.com/hyperledger/aries-framework-go/component/log v0.0.0-20230901120639-e17eddd3ad3e // indirect github.com/hyperledger/aries-framework-go/component/models v0.0.0-20230901120639-e17eddd3ad3e // indirect @@ -99,7 +99,6 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/sjson v1.1.4 // indirect - github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692 // indirect github.com/trustbloc/sidetree-svc-go v0.0.0-20230928215925-11c8459cb32d // indirect github.com/whyrusleeping/tar-utils v0.0.0-20180509141711-8c6c8ba81d5c // indirect github.com/x448/float16 v0.8.4 // indirect diff --git a/cmd/orb-cli/go.sum b/cmd/orb-cli/go.sum index 44d4b6f2f..11bca1f20 100644 --- a/cmd/orb-cli/go.sum +++ b/cmd/orb-cli/go.sum @@ -461,12 +461,12 @@ github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63 github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hyperledger/aries-framework-go v0.3.3-0.20230901120639-e17eddd3ad3e h1:2QRDh/BG6aQaIwHPSLfEZHBvnyP7wAD3lzn/CCa7cp4= github.com/hyperledger/aries-framework-go v0.3.3-0.20230901120639-e17eddd3ad3e/go.mod h1:uH0Od/EyS1bQkW1BWo8qqz8szU3VEpNK1YXR1SJgqK4= -github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf h1:F12zbOSRsye3IWK3Zb6prgrqQQFYnz5zjGSCh9pfYzk= -github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf/go.mod h1:GDANCnJONcCqBvv6QgKuk5Y2FWHyD/Hu26kyc7NTyfY= -github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20230612123444-d285f3c85595 h1:0T03C+omruM3eSi+kJJyG7Wjms6PtiSz4C8PymrfCwg= -github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20230612123444-d285f3c85595/go.mod h1:TwEnYh669P6PdnjHHSCXI5Dy00vo5vjdCHttmwpXLXI= -github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20230612123444-d285f3c85595 h1:V3pSkJiQ+Gb+E66F6qeE7VszyNs48AEmvimg98hWGNQ= -github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20230612123444-d285f3c85595/go.mod h1:HnHKv7F2AWSrzbBLQ/Q0T3b4Xq841T7joJizZXPMAXE= +github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c h1:4y0CFPFyoA3Jd7EzY2NqC31bILuMe2xXAqWm0s1RJuU= +github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c/go.mod h1:GDANCnJONcCqBvv6QgKuk5Y2FWHyD/Hu26kyc7NTyfY= +github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20231002134513-a3b96bcbb37c h1:hNwp043Ba/3TwDLpQAS9tqN0zQCFdnBYTy1NWXFtQNM= +github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20231002134513-a3b96bcbb37c/go.mod h1:pURPg3cSdbs1yhGXCbOzeXHr7M4OHbN3HEuXOg7kEd0= +github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20231002134513-a3b96bcbb37c h1:HqDYWlytUw+xMS4THsHcovcS/hdnFko06Dpi5JrjsiE= +github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20231002134513-a3b96bcbb37c/go.mod h1:vQBl9EQq2V6MHAwUbr+rnExJEGp2EXnaxDcaEKCEKd4= github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230901120639-e17eddd3ad3e h1:rWchzRr9jP8a9ggR/y8vdIGLvGrij1auh58v10eIgik= github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230901120639-e17eddd3ad3e/go.mod h1:nmT2WqhIs9Eyncdr9feYrUIy7ggf00bWnTzCN6/t8PY= github.com/hyperledger/aries-framework-go/component/log v0.0.0-20230901120639-e17eddd3ad3e h1:q6/fpTbRpVJq4vDcapAGybUeg9ud1F4Arlpz8Ru+YZU= @@ -864,8 +864,6 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1 github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/trustbloc/logutil-go v1.0.0-rc1 h1:rRJbvgQfrlUfyej+mY0nuQJymGqjRW4oZEwKi544F4c= github.com/trustbloc/logutil-go v1.0.0-rc1/go.mod h1:JlxT0oZfNKgIlSNtgc001WEeDMxlnAvOM43gNm8DQVc= -github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692 h1:8J/lEaFqWfGugvt5u/d5l9OvJoZZpE2XU3bR/U6iKjM= -github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692/go.mod h1:jdxAFuorlIwFOGVW6O455/lZqxg2mZkRHNTEolcZdDI= github.com/trustbloc/sidetree-go v0.0.0-20230928172705-30e78b6b6ddd h1:hWWZ7lQSRK5FOcVhG5cUtwaNwWLYaz9wASiR5GyPtQE= github.com/trustbloc/sidetree-go v0.0.0-20230928172705-30e78b6b6ddd/go.mod h1:3oQhk0vOdhaUpPEQBFBzwqH8t0d8bcP2XLU2orBY13U= github.com/trustbloc/sidetree-svc-go v0.0.0-20230928215925-11c8459cb32d h1:gYr+RqqYV3vzNqSLj6ZPl2APBELfm9s9wKXHlAyNoDo= diff --git a/cmd/orb-cli/recoverdidcmd/recoverdid.go b/cmd/orb-cli/recoverdidcmd/recoverdid.go index 3fb788016..1892b241f 100644 --- a/cmd/orb-cli/recoverdidcmd/recoverdid.go +++ b/cmd/orb-cli/recoverdidcmd/recoverdid.go @@ -114,7 +114,7 @@ const ( " Alternatively, this can be set with the following environment variable: " + nextUpdateKeyFileEnvKey nextUpdateKeyIDFlagName = "nextupdatekey-id" - nextUpdateKeyIDEnvKey = "ORB_CLI_NEXTUPDATEKEY_ID" + nextUpdateKeyIDEnvKey = "ORB_CLI_NEXTUPDATEKEY_ID" //nolint:gosec nextUpdateKeyIDFlagUsage = "The key id in kms" + " used for validating the signature of the next update of the document. " + " Alternatively, this can be set with the following environment variable: " + nextUpdateKeyIDEnvKey diff --git a/cmd/orb-cli/updatedidcmd/updatedid.go b/cmd/orb-cli/updatedidcmd/updatedid.go index 55aa119fe..c42654a16 100644 --- a/cmd/orb-cli/updatedidcmd/updatedid.go +++ b/cmd/orb-cli/updatedidcmd/updatedid.go @@ -76,7 +76,7 @@ const ( " Alternatively, this can be set with the following environment variable: " + addPublicKeyFileEnvKey addServiceFileFlagName = "add-service-file" - addServiceFileEnvKey = "ORB_CLI_ADD_SERVICE_FILE" + addServiceFileEnvKey = "ORB_CLI_ADD_SERVICE_FILE" //nolint:gosec addServiceFlagUsage = "publickey file include services to be added for Orb DID " + " Alternatively, this can be set with the following environment variable: " + addServiceFileEnvKey @@ -114,7 +114,7 @@ const ( " Alternatively, this can be set with the following environment variable: " + nextUpdateKeyFileEnvKey nextUpdateKeyIDFlagName = "nextupdatekey-id" - nextUpdateKeyIDEnvKey = "ORB_CLI_NEXTUPDATEKEY_ID" + nextUpdateKeyIDEnvKey = "ORB_CLI_NEXTUPDATEKEY_ID" //nolint:gosec nextUpdateKeyIDFlagUsage = "The key id in kms" + " used for validating the signature of the next update of the document. " + " Alternatively, this can be set with the following environment variable: " + nextUpdateKeyIDEnvKey diff --git a/cmd/orb-driver/go.mod b/cmd/orb-driver/go.mod index cd2afa9eb..ba19b7603 100644 --- a/cmd/orb-driver/go.mod +++ b/cmd/orb-driver/go.mod @@ -9,11 +9,11 @@ go 1.21 toolchain go1.21.0 require ( - github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20230612123444-d285f3c85595 + github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20231002134513-a3b96bcbb37c github.com/spf13/cobra v1.5.0 github.com/stretchr/testify v1.8.2 github.com/trustbloc/logutil-go v1.0.0-rc1 - github.com/trustbloc/orb v1.0.0-rc7 + github.com/trustbloc/orb v1.0.1-0.20230929144409-1e0e7e685841 ) require ( @@ -44,8 +44,8 @@ require ( github.com/google/uuid v1.3.0 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/hyperledger/aries-framework-go v0.3.3-0.20230901120639-e17eddd3ad3e // indirect - github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf // indirect - github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20230612123444-d285f3c85595 // indirect + github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c // indirect + github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20231002134513-a3b96bcbb37c // indirect github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230901120639-e17eddd3ad3e // indirect github.com/hyperledger/aries-framework-go/component/log v0.0.0-20230901120639-e17eddd3ad3e // indirect github.com/hyperledger/aries-framework-go/component/models v0.0.0-20230901120639-e17eddd3ad3e // indirect @@ -89,7 +89,6 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/sjson v1.1.4 // indirect - github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692 // indirect github.com/trustbloc/sidetree-go v0.0.0-20230928172705-30e78b6b6ddd // indirect github.com/trustbloc/sidetree-svc-go v0.0.0-20230928215925-11c8459cb32d // indirect github.com/trustbloc/vct v1.0.0 // indirect diff --git a/cmd/orb-driver/go.sum b/cmd/orb-driver/go.sum index a8cd38611..62a8b2e5d 100644 --- a/cmd/orb-driver/go.sum +++ b/cmd/orb-driver/go.sum @@ -460,12 +460,12 @@ github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63 github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hyperledger/aries-framework-go v0.3.3-0.20230901120639-e17eddd3ad3e h1:2QRDh/BG6aQaIwHPSLfEZHBvnyP7wAD3lzn/CCa7cp4= github.com/hyperledger/aries-framework-go v0.3.3-0.20230901120639-e17eddd3ad3e/go.mod h1:uH0Od/EyS1bQkW1BWo8qqz8szU3VEpNK1YXR1SJgqK4= -github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf h1:F12zbOSRsye3IWK3Zb6prgrqQQFYnz5zjGSCh9pfYzk= -github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf/go.mod h1:GDANCnJONcCqBvv6QgKuk5Y2FWHyD/Hu26kyc7NTyfY= -github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20230612123444-d285f3c85595 h1:0T03C+omruM3eSi+kJJyG7Wjms6PtiSz4C8PymrfCwg= -github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20230612123444-d285f3c85595/go.mod h1:TwEnYh669P6PdnjHHSCXI5Dy00vo5vjdCHttmwpXLXI= -github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20230612123444-d285f3c85595 h1:V3pSkJiQ+Gb+E66F6qeE7VszyNs48AEmvimg98hWGNQ= -github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20230612123444-d285f3c85595/go.mod h1:HnHKv7F2AWSrzbBLQ/Q0T3b4Xq841T7joJizZXPMAXE= +github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c h1:4y0CFPFyoA3Jd7EzY2NqC31bILuMe2xXAqWm0s1RJuU= +github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c/go.mod h1:GDANCnJONcCqBvv6QgKuk5Y2FWHyD/Hu26kyc7NTyfY= +github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20231002134513-a3b96bcbb37c h1:hNwp043Ba/3TwDLpQAS9tqN0zQCFdnBYTy1NWXFtQNM= +github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20231002134513-a3b96bcbb37c/go.mod h1:pURPg3cSdbs1yhGXCbOzeXHr7M4OHbN3HEuXOg7kEd0= +github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20231002134513-a3b96bcbb37c h1:HqDYWlytUw+xMS4THsHcovcS/hdnFko06Dpi5JrjsiE= +github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20231002134513-a3b96bcbb37c/go.mod h1:vQBl9EQq2V6MHAwUbr+rnExJEGp2EXnaxDcaEKCEKd4= github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230901120639-e17eddd3ad3e h1:rWchzRr9jP8a9ggR/y8vdIGLvGrij1auh58v10eIgik= github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230901120639-e17eddd3ad3e/go.mod h1:nmT2WqhIs9Eyncdr9feYrUIy7ggf00bWnTzCN6/t8PY= github.com/hyperledger/aries-framework-go/component/log v0.0.0-20230901120639-e17eddd3ad3e h1:q6/fpTbRpVJq4vDcapAGybUeg9ud1F4Arlpz8Ru+YZU= @@ -855,8 +855,6 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1 github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/trustbloc/logutil-go v1.0.0-rc1 h1:rRJbvgQfrlUfyej+mY0nuQJymGqjRW4oZEwKi544F4c= github.com/trustbloc/logutil-go v1.0.0-rc1/go.mod h1:JlxT0oZfNKgIlSNtgc001WEeDMxlnAvOM43gNm8DQVc= -github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692 h1:8J/lEaFqWfGugvt5u/d5l9OvJoZZpE2XU3bR/U6iKjM= -github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692/go.mod h1:jdxAFuorlIwFOGVW6O455/lZqxg2mZkRHNTEolcZdDI= github.com/trustbloc/sidetree-go v0.0.0-20230928172705-30e78b6b6ddd h1:hWWZ7lQSRK5FOcVhG5cUtwaNwWLYaz9wASiR5GyPtQE= github.com/trustbloc/sidetree-go v0.0.0-20230928172705-30e78b6b6ddd/go.mod h1:3oQhk0vOdhaUpPEQBFBzwqH8t0d8bcP2XLU2orBY13U= github.com/trustbloc/sidetree-svc-go v0.0.0-20230928215925-11c8459cb32d h1:gYr+RqqYV3vzNqSLj6ZPl2APBELfm9s9wKXHlAyNoDo= diff --git a/cmd/orb-server/go.mod b/cmd/orb-server/go.mod index f3519f911..eba9535f6 100644 --- a/cmd/orb-server/go.mod +++ b/cmd/orb-server/go.mod @@ -14,8 +14,8 @@ require ( github.com/cenkalti/backoff/v4 v4.1.3 github.com/google/uuid v1.3.0 github.com/hyperledger/aries-framework-go v0.1.9-0.20221104133505-b2cd6a82a8e4 - github.com/hyperledger/aries-framework-go-ext/component/storage/couchdb v0.0.0-20220428163625-96d8261511e1 - github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf + github.com/hyperledger/aries-framework-go-ext/component/storage/couchdb v0.0.0-20231002134513-a3b96bcbb37c + github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20220610133818-119077b0ec85 github.com/hyperledger/aries-framework-go/spi v0.0.0-20221025204933-b807371b6f1e github.com/piprate/json-gold v0.4.2 diff --git a/cmd/orb-server/go.sum b/cmd/orb-server/go.sum index ba53b477a..3906ba1d9 100644 --- a/cmd/orb-server/go.sum +++ b/cmd/orb-server/go.sum @@ -541,10 +541,10 @@ github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63 github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hyperledger/aries-framework-go v0.1.9-0.20221104133505-b2cd6a82a8e4 h1:M9FRYd7XTKkcLNkWP7s2wig7Sjbo0B40Nrn8k2aGLMg= github.com/hyperledger/aries-framework-go v0.1.9-0.20221104133505-b2cd6a82a8e4/go.mod h1:5lp5+NPjRngsjFLYYGg5mtkvw6I4Mr7CKz+wHYxROk0= -github.com/hyperledger/aries-framework-go-ext/component/storage/couchdb v0.0.0-20220428163625-96d8261511e1 h1:J17kEzMu0cA2xsgC0VcZiKu9ivV0/WMMmeCW7UrfQ1Y= -github.com/hyperledger/aries-framework-go-ext/component/storage/couchdb v0.0.0-20220428163625-96d8261511e1/go.mod h1:q8qjsQpYo7AYG0pqQg1zgEoIVc+Hrpf5S0WciiwPDQA= -github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf h1:F12zbOSRsye3IWK3Zb6prgrqQQFYnz5zjGSCh9pfYzk= -github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf/go.mod h1:GDANCnJONcCqBvv6QgKuk5Y2FWHyD/Hu26kyc7NTyfY= +github.com/hyperledger/aries-framework-go-ext/component/storage/couchdb v0.0.0-20231002134513-a3b96bcbb37c h1:M/Q//j6EnNrf2ZWpjp6GvWqohDxMROa2Qv1p0dHcUCo= +github.com/hyperledger/aries-framework-go-ext/component/storage/couchdb v0.0.0-20231002134513-a3b96bcbb37c/go.mod h1:q8qjsQpYo7AYG0pqQg1zgEoIVc+Hrpf5S0WciiwPDQA= +github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c h1:4y0CFPFyoA3Jd7EzY2NqC31bILuMe2xXAqWm0s1RJuU= +github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c/go.mod h1:GDANCnJONcCqBvv6QgKuk5Y2FWHyD/Hu26kyc7NTyfY= github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20220610133818-119077b0ec85 h1:P82lZe6zDjaP2j87nDYQBSBYrB6Nq6nc9MtyNMC3K4A= github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20220610133818-119077b0ec85/go.mod h1:ryG46jQRvQUUH/0wjORghfJnxJVH1yIXIsAv1GXIWp8= github.com/hyperledger/aries-framework-go/spi v0.0.0-20221025204933-b807371b6f1e h1:SxbXlF39661T9w/L9PhVdtbJfJ51Pm4JYEEW6XfZHEQ= diff --git a/go.mod b/go.mod index 67790d628..be92a012b 100755 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 github.com/hyperledger/aries-framework-go v0.1.9-0.20221104133505-b2cd6a82a8e4 - github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf + github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20220610133818-119077b0ec85 github.com/hyperledger/aries-framework-go/spi v0.0.0-20221025204933-b807371b6f1e github.com/igor-pavlenko/httpsignatures-go v0.0.23 diff --git a/go.sum b/go.sum index ff2149e05..7acc14acb 100644 --- a/go.sum +++ b/go.sum @@ -535,8 +535,8 @@ github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63 github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hyperledger/aries-framework-go v0.1.9-0.20221104133505-b2cd6a82a8e4 h1:M9FRYd7XTKkcLNkWP7s2wig7Sjbo0B40Nrn8k2aGLMg= github.com/hyperledger/aries-framework-go v0.1.9-0.20221104133505-b2cd6a82a8e4/go.mod h1:5lp5+NPjRngsjFLYYGg5mtkvw6I4Mr7CKz+wHYxROk0= -github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf h1:F12zbOSRsye3IWK3Zb6prgrqQQFYnz5zjGSCh9pfYzk= -github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf/go.mod h1:GDANCnJONcCqBvv6QgKuk5Y2FWHyD/Hu26kyc7NTyfY= +github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c h1:4y0CFPFyoA3Jd7EzY2NqC31bILuMe2xXAqWm0s1RJuU= +github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c/go.mod h1:GDANCnJONcCqBvv6QgKuk5Y2FWHyD/Hu26kyc7NTyfY= github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20220610133818-119077b0ec85 h1:P82lZe6zDjaP2j87nDYQBSBYrB6Nq6nc9MtyNMC3K4A= github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20220610133818-119077b0ec85/go.mod h1:ryG46jQRvQUUH/0wjORghfJnxJVH1yIXIsAv1GXIWp8= github.com/hyperledger/aries-framework-go/spi v0.0.0-20221025204933-b807371b6f1e h1:SxbXlF39661T9w/L9PhVdtbJfJ51Pm4JYEEW6XfZHEQ= diff --git a/pkg/activitypub/client/client_test.go b/pkg/activitypub/client/client_test.go index 5cbdaa771..5133970f4 100644 --- a/pkg/activitypub/client/client_test.go +++ b/pkg/activitypub/client/client_test.go @@ -662,7 +662,7 @@ func TestClient_GetDIDPublicKey(t *testing.T) { privKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) require.NoError(t, err) - pubKey := elliptic.Marshal(elliptic.P256(), privKey.PublicKey.X, privKey.PublicKey.Y) + pubKey := elliptic.Marshal(elliptic.P256(), privKey.PublicKey.X, privKey.PublicKey.Y) //nolint:staticcheck c := New(Config{}, &mocks.HTTPTransport{}, func(issuerID, keyID string) (*verifier.PublicKey, error) { diff --git a/pkg/activitypub/httpsig/algorithm_test.go b/pkg/activitypub/httpsig/algorithm_test.go index 2769cae29..8cd9e397f 100644 --- a/pkg/activitypub/httpsig/algorithm_test.go +++ b/pkg/activitypub/httpsig/algorithm_test.go @@ -100,7 +100,7 @@ func TestSignatureHashAlgorithm_Verify(t *testing.T) { require.NoError(t, err) data := []byte("data") - pubKey := elliptic.Marshal(elliptic.P256(), privKey.PublicKey.X, privKey.PublicKey.Y) + pubKey := elliptic.Marshal(elliptic.P256(), privKey.PublicKey.X, privKey.PublicKey.Y) //nolint:staticcheck s := ecsigner.New(privKey, "ES256", uuid.NewString()) signature, err := s.Sign(data) diff --git a/pkg/activitypub/resthandler/acceptlisthandler_test.go b/pkg/activitypub/resthandler/acceptlisthandler_test.go index d5b8c3fc9..2a4c64ec1 100644 --- a/pkg/activitypub/resthandler/acceptlisthandler_test.go +++ b/pkg/activitypub/resthandler/acceptlisthandler_test.go @@ -91,7 +91,7 @@ func TestAcceptListWriter_Handler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, acceptListURL, bytes.NewBuffer([]byte(`[]`))) + req := httptest.NewRequest(http.MethodPost, acceptListURL, bytes.NewBufferString(`[]`)) h.handlePost(rw, req) @@ -111,7 +111,7 @@ func TestAcceptListWriter_Handler(t *testing.T) { rw := httptest.NewRecorder() req := httptest.NewRequest(http.MethodPost, acceptListURL, - bytes.NewBuffer([]byte(`[{"type":"follow","add":["https://domain1.com/services/orb"]}]`))) + bytes.NewBufferString(`[{"type":"follow","add":["https://domain1.com/services/orb"]}]`)) h.handlePost(rw, req) @@ -157,7 +157,7 @@ func TestAcceptListReader_Handler(t *testing.T) { require.NotNil(t, h.Handler()) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, acceptListURL, nil) + req := httptest.NewRequest(http.MethodGet, acceptListURL, http.NoBody) restoreType := setTypeParam("follow") defer restoreType() @@ -199,7 +199,7 @@ func TestAcceptListReader_Handler(t *testing.T) { require.NotNil(t, h.Handler()) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, acceptListURL, nil) + req := httptest.NewRequest(http.MethodGet, acceptListURL, http.NoBody) h.handleGet(rw, req) @@ -225,7 +225,7 @@ func TestAcceptListReader_Handler(t *testing.T) { require.NotNil(t, h.Handler()) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, acceptListURL, nil) + req := httptest.NewRequest(http.MethodGet, acceptListURL, http.NoBody) restoreType := setTypeParam("follow") defer restoreType() @@ -247,7 +247,7 @@ func TestAcceptListReader_Handler(t *testing.T) { require.NotNil(t, h.Handler()) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, acceptListURL, nil) + req := httptest.NewRequest(http.MethodGet, acceptListURL, http.NoBody) h.handleGet(rw, req) @@ -270,7 +270,7 @@ func TestAcceptListReader_Handler(t *testing.T) { h.marshal = func(v interface{}) ([]byte, error) { return nil, errExpected } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, acceptListURL, nil) + req := httptest.NewRequest(http.MethodGet, acceptListURL, http.NoBody) restoreType := setTypeParam("follow") defer restoreType() @@ -302,7 +302,7 @@ func TestAcceptListReader_Handler(t *testing.T) { h.marshal = func(v interface{}) ([]byte, error) { return nil, errExpected } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, acceptListURL, nil) + req := httptest.NewRequest(http.MethodGet, acceptListURL, http.NoBody) h.handleGet(rw, req) @@ -324,7 +324,7 @@ func testPostBadRequest(t *testing.T, desc, request string) { require.NotNil(t, h.Handler()) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, acceptListURL, bytes.NewBuffer([]byte(request))) + req := httptest.NewRequest(http.MethodPost, acceptListURL, bytes.NewBufferString(request)) h.handlePost(rw, req) diff --git a/pkg/activitypub/resthandler/activityhandler_test.go b/pkg/activitypub/resthandler/activityhandler_test.go index 7a347d6fc..cff3965c7 100644 --- a/pkg/activitypub/resthandler/activityhandler_test.go +++ b/pkg/activitypub/resthandler/activityhandler_test.go @@ -196,7 +196,7 @@ func TestActivities_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, inboxURL, nil) + req := httptest.NewRequest(http.MethodGet, inboxURL, http.NoBody) h.handle(rw, req) @@ -222,7 +222,7 @@ func TestActivities_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, inboxURL, nil) + req := httptest.NewRequest(http.MethodGet, inboxURL, http.NoBody) h.handle(rw, req) @@ -242,7 +242,7 @@ func TestActivities_Handler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, inboxURL, nil) + req := httptest.NewRequest(http.MethodGet, inboxURL, http.NoBody) h.handle(rw, req) @@ -263,7 +263,7 @@ func TestActivities_Handler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, inboxURL, nil) + req := httptest.NewRequest(http.MethodGet, inboxURL, http.NoBody) h.handle(rw, req) @@ -280,7 +280,7 @@ func TestActivities_Handler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, inboxURL, nil) + req := httptest.NewRequest(http.MethodGet, inboxURL, http.NoBody) h.handle(rw, req) @@ -301,7 +301,7 @@ func TestActivities_Handler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, inboxURL, nil) + req := httptest.NewRequest(http.MethodGet, inboxURL, http.NoBody) h.handle(rw, req) @@ -323,7 +323,7 @@ func TestActivities_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, inboxURL, nil) + req := httptest.NewRequest(http.MethodGet, inboxURL, http.NoBody) h.handle(rw, req) @@ -343,7 +343,7 @@ func TestActivities_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, inboxURL, nil) + req := httptest.NewRequest(http.MethodGet, inboxURL, http.NoBody) h.handle(rw, req) @@ -406,7 +406,7 @@ func TestActivities_PageHandler(t *testing.T) { defer restorePaging() rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, outboxURL, nil) + req := httptest.NewRequest(http.MethodGet, outboxURL, http.NoBody) h.handle(rw, req) @@ -434,7 +434,7 @@ func TestActivities_PageHandler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, outboxURL, nil) + req := httptest.NewRequest(http.MethodGet, outboxURL, http.NoBody) h.handle(rw, req) @@ -475,7 +475,7 @@ func TestReadOutbox_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, outboxURL, nil) + req := httptest.NewRequest(http.MethodGet, outboxURL, http.NoBody) h.handleOutbox(rw, req) @@ -502,7 +502,7 @@ func TestReadOutbox_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, outboxURL, nil) + req := httptest.NewRequest(http.MethodGet, outboxURL, http.NoBody) h.handleOutbox(rw, req) @@ -529,7 +529,7 @@ func TestReadOutbox_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, outboxURL, nil) + req := httptest.NewRequest(http.MethodGet, outboxURL, http.NoBody) h.handleOutbox(rw, req) @@ -575,7 +575,7 @@ func TestShares_Handler(t *testing.T) { defer restore() rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, sharesURL, nil) + req := httptest.NewRequest(http.MethodGet, sharesURL, http.NoBody) h.handle(rw, req) @@ -631,7 +631,7 @@ func TestShares_PageHandler(t *testing.T) { defer restore() rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, sharesURL, nil) + req := httptest.NewRequest(http.MethodGet, sharesURL, http.NoBody) h.handle(rw, req) @@ -658,7 +658,7 @@ func TestShares_PageHandler(t *testing.T) { defer restore() rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, sharesURL, nil) + req := httptest.NewRequest(http.MethodGet, sharesURL, http.NoBody) h.handle(rw, req) @@ -744,7 +744,7 @@ func TestActivity_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) restoreID := setIDParam(id) defer restoreID() @@ -768,7 +768,7 @@ func TestActivity_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) h.handle(rw, req) @@ -782,7 +782,7 @@ func TestActivity_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) restoreID := setIDParam("123") defer restoreID() @@ -802,7 +802,7 @@ func TestActivity_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) restoreID := setIDParam(id) defer restoreID() @@ -825,7 +825,7 @@ func TestActivity_Handler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) restoreID := setIDParam(id) defer restoreID() @@ -856,7 +856,7 @@ func TestActivity_Handler(t *testing.T) { t.Run("Non-public activity -> unauthorized", func(t *testing.T) { rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) restoreID := setIDParam(id) defer restoreID() @@ -870,7 +870,7 @@ func TestActivity_Handler(t *testing.T) { t.Run("Public activity -> success", func(t *testing.T) { rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) restoreID := setIDParam(publicID) defer restoreID() @@ -899,7 +899,7 @@ func TestActivity_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) restoreID := setIDParam(id) defer restoreID() @@ -963,7 +963,7 @@ func handleActivitiesRequest(t *testing.T, serviceIRI *url.URL, as spi.Store, pa defer restorePaging() rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, outboxURL, nil) + req := httptest.NewRequest(http.MethodGet, outboxURL, http.NoBody) h.handle(rw, req) diff --git a/pkg/activitypub/resthandler/authhandler_test.go b/pkg/activitypub/resthandler/authhandler_test.go index 18b5a3887..e726dc426 100644 --- a/pkg/activitypub/resthandler/authhandler_test.go +++ b/pkg/activitypub/resthandler/authhandler_test.go @@ -46,7 +46,7 @@ func TestNewAuthHandler(t *testing.T) { ) require.NotNil(t, h) - req := httptest.NewRequest(http.MethodPost, inboxURL, nil) + req := httptest.NewRequest(http.MethodPost, inboxURL, http.NoBody) req.Header[authHeader] = []string{tokenPrefix + "ADMIN_TOKEN"} ok, actorIRI, err := h.Authorize(req) @@ -65,7 +65,7 @@ func TestNewAuthHandler(t *testing.T) { ) require.NotNil(t, h) - req := httptest.NewRequest(http.MethodGet, inboxURL, nil) + req := httptest.NewRequest(http.MethodGet, inboxURL, http.NoBody) req.Header[authHeader] = []string{tokenPrefix + "READ_TOKEN"} ok, actorIRI, err := h.Authorize(req) @@ -85,7 +85,7 @@ func TestNewAuthHandler(t *testing.T) { ) require.NotNil(t, h) - req := httptest.NewRequest(http.MethodPost, inboxURL, nil) + req := httptest.NewRequest(http.MethodPost, inboxURL, http.NoBody) req.Header[authHeader] = []string{tokenPrefix + "INVALID_TOKEN"} ok, actorIRI, err := h.Authorize(req) @@ -108,7 +108,7 @@ func TestNewAuthHandler(t *testing.T) { ) require.NotNil(t, h) - req := httptest.NewRequest(http.MethodPost, inboxURL, nil) + req := httptest.NewRequest(http.MethodPost, inboxURL, http.NoBody) ok, actorIRI, err := h.Authorize(req) require.NoError(t, err) @@ -131,7 +131,7 @@ func TestNewAuthHandler(t *testing.T) { ) require.NotNil(t, h) - req := httptest.NewRequest(http.MethodPost, inboxURL, nil) + req := httptest.NewRequest(http.MethodPost, inboxURL, http.NoBody) ok, actorIRI, err := h.Authorize(req) require.NoError(t, err) @@ -169,7 +169,7 @@ func TestNewAuthHandler(t *testing.T) { ) require.NotNil(t, h) - req := httptest.NewRequest(http.MethodGet, inboxURL, nil) + req := httptest.NewRequest(http.MethodGet, inboxURL, http.NoBody) ok, actorIRI, err := h.Authorize(req) require.NoError(t, err) @@ -193,7 +193,7 @@ func TestNewAuthHandler(t *testing.T) { ) require.NotNil(t, h) - req := httptest.NewRequest(http.MethodGet, inboxURL, nil) + req := httptest.NewRequest(http.MethodGet, inboxURL, http.NoBody) ok, actorIRI, err := h.Authorize(req) require.Error(t, err) @@ -218,7 +218,7 @@ func TestNewAuthHandler(t *testing.T) { ) require.NotNil(t, h) - req := httptest.NewRequest(http.MethodGet, inboxURL, nil) + req := httptest.NewRequest(http.MethodGet, inboxURL, http.NoBody) ok, actorIRI, err := h.Authorize(req) require.Error(t, err) diff --git a/pkg/activitypub/resthandler/outboxhandler_test.go b/pkg/activitypub/resthandler/outboxhandler_test.go index d4a9689f6..fc827e061 100644 --- a/pkg/activitypub/resthandler/outboxhandler_test.go +++ b/pkg/activitypub/resthandler/outboxhandler_test.go @@ -156,7 +156,7 @@ func TestOutbox_Handler(t *testing.T) { h := NewPostOutbox(cfg, ob, activityStore, verifier, tm) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, outboxURL, nil) + req := httptest.NewRequest(http.MethodPost, outboxURL, http.NoBody) h.handlePost(rw, req) diff --git a/pkg/activitypub/resthandler/referencehandler_test.go b/pkg/activitypub/resthandler/referencehandler_test.go index 8b7d2d5b9..53ba9b71f 100644 --- a/pkg/activitypub/resthandler/referencehandler_test.go +++ b/pkg/activitypub/resthandler/referencehandler_test.go @@ -134,7 +134,7 @@ func TestFollowers_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, followersURL, nil) + req := httptest.NewRequest(http.MethodGet, followersURL, http.NoBody) h.handle(rw, req) @@ -160,7 +160,7 @@ func TestFollowers_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, followersURL, nil) + req := httptest.NewRequest(http.MethodGet, followersURL, http.NoBody) h.handle(rw, req) @@ -180,7 +180,7 @@ func TestFollowers_Handler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, followersURL, nil) + req := httptest.NewRequest(http.MethodGet, followersURL, http.NoBody) h.handle(rw, req) @@ -200,7 +200,7 @@ func TestFollowers_Handler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, outboxURL, nil) + req := httptest.NewRequest(http.MethodGet, outboxURL, http.NoBody) h.handle(rw, req) @@ -222,7 +222,7 @@ func TestFollowers_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, followersURL, nil) + req := httptest.NewRequest(http.MethodGet, followersURL, http.NoBody) h.handle(rw, req) @@ -242,7 +242,7 @@ func TestFollowers_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, followersURL, nil) + req := httptest.NewRequest(http.MethodGet, followersURL, http.NoBody) h.handle(rw, req) @@ -318,7 +318,7 @@ func TestFollowers_PageHandler(t *testing.T) { defer restorePaging() rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, followersURL, nil) + req := httptest.NewRequest(http.MethodGet, followersURL, http.NoBody) h.handle(rw, req) @@ -347,7 +347,7 @@ func TestFollowers_PageHandler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, followersURL, nil) + req := httptest.NewRequest(http.MethodGet, followersURL, http.NoBody) h.handle(rw, req) @@ -484,7 +484,7 @@ func handleRequest(t *testing.T, h *handler, handle http.HandlerFunc, page, page defer restorePaging() rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, "https://example.com/services/orb", nil) + req := httptest.NewRequest(http.MethodGet, "https://example.com/services/orb", http.NoBody) handle(rw, req) diff --git a/pkg/activitypub/resthandler/serviceshandler_test.go b/pkg/activitypub/resthandler/serviceshandler_test.go index 2fcc1acf3..38d04a7d3 100644 --- a/pkg/activitypub/resthandler/serviceshandler_test.go +++ b/pkg/activitypub/resthandler/serviceshandler_test.go @@ -82,7 +82,7 @@ func TestServices_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) h.handle(rw, req) @@ -109,7 +109,7 @@ func TestServices_Handler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) h.handle(rw, req) @@ -132,7 +132,7 @@ func TestServices_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) h.handle(rw, req) @@ -155,7 +155,7 @@ func TestPublicKeys_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) restoreID := setIDParam(MainKeyID) defer restoreID() @@ -179,7 +179,7 @@ func TestPublicKeys_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) h.handlePublicKey(rw, req) @@ -193,7 +193,7 @@ func TestPublicKeys_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) restoreID := setIDParam("invalid-key") defer restoreID() @@ -216,7 +216,7 @@ func TestPublicKeys_Handler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) restoreID := setIDParam(MainKeyID) defer restoreID() @@ -242,7 +242,7 @@ func TestPublicKeys_Handler(t *testing.T) { require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), nil) + req := httptest.NewRequest(http.MethodGet, serviceIRI.String(), http.NoBody) restoreID := setIDParam(MainKeyID) defer restoreID() diff --git a/pkg/activitypub/service/inbox/httpsubscriber/httpsubscriber_test.go b/pkg/activitypub/service/inbox/httpsubscriber/httpsubscriber_test.go index 75350134a..8beef18d2 100644 --- a/pkg/activitypub/service/inbox/httpsubscriber/httpsubscriber_test.go +++ b/pkg/activitypub/service/inbox/httpsubscriber/httpsubscriber_test.go @@ -70,7 +70,7 @@ func TestSubscriber_HandleAck(t *testing.T) { }() rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, nil) + req := httptest.NewRequest(http.MethodPost, endpoint, http.NoBody) s.handleMessage(rw, req) @@ -102,7 +102,7 @@ func TestSubscriber_HandleNack(t *testing.T) { }() rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, nil) + req := httptest.NewRequest(http.MethodPost, endpoint, http.NoBody) s.handleMessage(rw, req) @@ -189,7 +189,7 @@ func TestSubscriber_Close(t *testing.T) { require.NoError(t, err) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, nil) + req := httptest.NewRequest(http.MethodPost, endpoint, http.NoBody) var wg sync.WaitGroup @@ -226,7 +226,7 @@ func TestSubscriber_Close(t *testing.T) { require.NoError(t, err) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, nil) + req := httptest.NewRequest(http.MethodPost, endpoint, http.NoBody) go func() { time.Sleep(10 * time.Millisecond) @@ -265,7 +265,7 @@ func TestSubscriber_InvalidHTTPSignature(t *testing.T) { }() rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, nil) + req := httptest.NewRequest(http.MethodPost, endpoint, http.NoBody) s.handleMessage(rw, req) @@ -299,7 +299,7 @@ func TestSubscriber_HTTPSignatureError(t *testing.T) { }() rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, nil) + req := httptest.NewRequest(http.MethodPost, endpoint, http.NoBody) s.handleMessage(rw, req) @@ -328,7 +328,7 @@ func TestSubscriber_NoHTTPSignatureRequired(t *testing.T) { }() rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, nil) + req := httptest.NewRequest(http.MethodPost, endpoint, http.NoBody) s.handleMessage(rw, req) diff --git a/pkg/activitypub/service/service_test.go b/pkg/activitypub/service/service_test.go index 08a242364..d0b8a78c7 100644 --- a/pkg/activitypub/service/service_test.go +++ b/pkg/activitypub/service/service_test.go @@ -947,7 +947,7 @@ func newServiceWithMocks(t *testing.T, endpoint string, serviceIRI *url.URL) (*S privKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) require.NoError(t, err) - pubKey := elliptic.Marshal(elliptic.P256(), privKey.PublicKey.X, privKey.PublicKey.Y) + pubKey := elliptic.Marshal(elliptic.P256(), privKey.PublicKey.X, privKey.PublicKey.Y) //nolint:staticcheck pemBytes := pem.EncodeToMemory(&pem.Block{ Type: "P-256", diff --git a/pkg/anchor/allowedorigins/allowedoriginsrest/allowedoriginshandler_test.go b/pkg/anchor/allowedorigins/allowedoriginsrest/allowedoriginshandler_test.go index 3534b0cce..e9068bc62 100644 --- a/pkg/anchor/allowedorigins/allowedoriginsrest/allowedoriginshandler_test.go +++ b/pkg/anchor/allowedorigins/allowedoriginsrest/allowedoriginshandler_test.go @@ -75,7 +75,7 @@ func TestWriter_Handler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, allowedOriginsURL, bytes.NewBuffer([]byte(`[]`))) + req := httptest.NewRequest(http.MethodPost, allowedOriginsURL, bytes.NewBufferString("[]")) h.handlePost(rw, req) @@ -95,7 +95,7 @@ func TestWriter_Handler(t *testing.T) { rw := httptest.NewRecorder() req := httptest.NewRequest(http.MethodPost, allowedOriginsURL, - bytes.NewBuffer([]byte(`{"add":["https://domain1.com/services/orb"]}`))) + bytes.NewBufferString(`{"add":["https://domain1.com/services/orb"]}`)) h.handlePost(rw, req) @@ -135,7 +135,7 @@ func TestReader_Handler(t *testing.T) { require.NotNil(t, h.Handler()) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, allowedOriginsURL, nil) + req := httptest.NewRequest(http.MethodGet, allowedOriginsURL, http.NoBody) h.handleGet(rw, req) @@ -161,7 +161,7 @@ func TestReader_Handler(t *testing.T) { require.NotNil(t, h.Handler()) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, allowedOriginsURL, nil) + req := httptest.NewRequest(http.MethodGet, allowedOriginsURL, http.NoBody) h.handleGet(rw, req) @@ -184,7 +184,7 @@ func TestReader_Handler(t *testing.T) { h.marshal = func(v interface{}) ([]byte, error) { return nil, errExpected } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, allowedOriginsURL, nil) + req := httptest.NewRequest(http.MethodGet, allowedOriginsURL, http.NoBody) h.handleGet(rw, req) @@ -202,7 +202,7 @@ func testPostBadRequest(t *testing.T, desc, request string) { require.NotNil(t, h.Handler()) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, allowedOriginsURL, bytes.NewBuffer([]byte(request))) + req := httptest.NewRequest(http.MethodPost, allowedOriginsURL, bytes.NewBufferString(request)) h.handlePost(rw, req) diff --git a/pkg/anchor/witness/policy/resthandler/configurator_test.go b/pkg/anchor/witness/policy/resthandler/configurator_test.go index a7905330c..2dc8f4ede 100644 --- a/pkg/anchor/witness/policy/resthandler/configurator_test.go +++ b/pkg/anchor/witness/policy/resthandler/configurator_test.go @@ -42,7 +42,7 @@ func TestHandler(t *testing.T) { require.NotNil(t, policyConfigurator) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(testPolicy))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString(testPolicy)) policyConfigurator.handle(rw, req) @@ -85,7 +85,7 @@ func TestHandler(t *testing.T) { require.NotNil(t, policyConfigurator) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte("InvalidPolicy"))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString("InvalidPolicy")) policyConfigurator.handle(rw, req) @@ -107,7 +107,7 @@ func TestHandler(t *testing.T) { require.NotNil(t, policyConfigurator) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(testPolicy))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString(testPolicy)) policyConfigurator.handle(rw, req) diff --git a/pkg/anchor/witness/policy/resthandler/retriever_test.go b/pkg/anchor/witness/policy/resthandler/retriever_test.go index 621b5ee78..393842d1f 100644 --- a/pkg/anchor/witness/policy/resthandler/retriever_test.go +++ b/pkg/anchor/witness/policy/resthandler/retriever_test.go @@ -38,7 +38,7 @@ func TestPolicyRetriever_Handler(t *testing.T) { require.NotNil(t, policyRetriever) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint, nil) + req := httptest.NewRequest(http.MethodGet, endpoint, http.NoBody) policyRetriever.handle(rw, req) @@ -62,7 +62,7 @@ func TestPolicyRetriever_Handler(t *testing.T) { require.NotNil(t, policyRetriever) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint, nil) + req := httptest.NewRequest(http.MethodGet, endpoint, http.NoBody) policyRetriever.handle(rw, req) @@ -79,7 +79,7 @@ func TestPolicyRetriever_Handler(t *testing.T) { require.NotNil(t, policyRetriever) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint, nil) + req := httptest.NewRequest(http.MethodGet, endpoint, http.NoBody) policyRetriever.handle(rw, req) diff --git a/pkg/anchor/witness/policy/selector/random/selector.go b/pkg/anchor/witness/policy/selector/random/selector.go index 851d3b8ae..199b78b16 100644 --- a/pkg/anchor/witness/policy/selector/random/selector.go +++ b/pkg/anchor/witness/policy/selector/random/selector.go @@ -17,7 +17,7 @@ import ( // New returns new random selector. func New() *Selector { - rand.Seed(time.Now().UnixNano()) + rand.Seed(time.Now().UnixNano()) //nolint:staticcheck return &Selector{} } diff --git a/pkg/httpserver/auth/authwrapper_test.go b/pkg/httpserver/auth/authwrapper_test.go index ae25baa5c..da4f1f940 100644 --- a/pkg/httpserver/auth/authwrapper_test.go +++ b/pkg/httpserver/auth/authwrapper_test.go @@ -26,7 +26,7 @@ func TestHandlerWrapper(t *testing.T) { require.NotNil(t, w) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, "/services/orb/outbox", nil) + req := httptest.NewRequest(http.MethodPost, "/services/orb/outbox", http.NoBody) req.Header[authHeader] = []string{tokenPrefix + "ADMIN_TOKEN"} w.Handler()(rw, req) @@ -47,7 +47,7 @@ func TestHandlerWrapper(t *testing.T) { require.NotNil(t, w) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, "/services/orb/outbox", nil) + req := httptest.NewRequest(http.MethodPost, "/services/orb/outbox", http.NoBody) w.Handler()(rw, req) diff --git a/pkg/httpserver/auth/tokenverifier_test.go b/pkg/httpserver/auth/tokenverifier_test.go index 0a556791e..1413ab799 100644 --- a/pkg/httpserver/auth/tokenverifier_test.go +++ b/pkg/httpserver/auth/tokenverifier_test.go @@ -39,7 +39,7 @@ func TestTokenVerifier(t *testing.T) { v := NewTokenVerifier(&apmocks.AuthTokenMgr{}, http.MethodPost, "/services/orb/outbox") require.NotNil(t, v) - req := httptest.NewRequest(http.MethodPost, "/services/orb/outbox", nil) + req := httptest.NewRequest(http.MethodPost, "/services/orb/outbox", http.NoBody) req.Header[authHeader] = []string{tokenPrefix + "ADMIN_TOKEN"} require.True(t, v.Verify(req)) @@ -52,7 +52,7 @@ func TestTokenVerifier(t *testing.T) { v := NewTokenVerifier(tm, http.MethodGet, "/services/orb/outbox") require.NotNil(t, v) - req := httptest.NewRequest(http.MethodGet, "/services/orb/outbox", nil) + req := httptest.NewRequest(http.MethodGet, "/services/orb/outbox", http.NoBody) require.False(t, v.Verify(req)) }) @@ -64,7 +64,7 @@ func TestTokenVerifier(t *testing.T) { v := NewTokenVerifier(tm, http.MethodGet, "/services/orb/outbox") require.NotNil(t, v) - req := httptest.NewRequest(http.MethodGet, "/services/orb/outbox", nil) + req := httptest.NewRequest(http.MethodGet, "/services/orb/outbox", http.NoBody) req.Header[authHeader] = []string{tokenPrefix + "INVALID_TOKEN"} require.False(t, v.Verify(req)) @@ -74,7 +74,7 @@ func TestTokenVerifier(t *testing.T) { v := NewTokenVerifier(&apmocks.AuthTokenMgr{}, http.MethodGet, "/services/orb/outbox") require.NotNil(t, v) - req := httptest.NewRequest(http.MethodGet, "/services/orb/outbox", nil) + req := httptest.NewRequest(http.MethodGet, "/services/orb/outbox", http.NoBody) require.True(t, v.Verify(req)) }) diff --git a/pkg/httpserver/maintenance/mode_test.go b/pkg/httpserver/maintenance/mode_test.go index 2b19f2bb4..b792d04ce 100644 --- a/pkg/httpserver/maintenance/mode_test.go +++ b/pkg/httpserver/maintenance/mode_test.go @@ -29,7 +29,7 @@ func TestHandlerWrapper(t *testing.T) { require.Equal(t, http.MethodPost, w.Method()) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, "/services/orb/inbox", nil) + req := httptest.NewRequest(http.MethodPost, "/services/orb/inbox", http.NoBody) w.Handler()(rw, req) diff --git a/pkg/nodeinfo/handler_test.go b/pkg/nodeinfo/handler_test.go index 0e3118778..ff00e18a6 100644 --- a/pkg/nodeinfo/handler_test.go +++ b/pkg/nodeinfo/handler_test.go @@ -101,7 +101,7 @@ func TestNewHandlerError(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, "https://example.com/nodeinfo", nil) + req := httptest.NewRequest(http.MethodGet, "https://example.com/nodeinfo", http.NoBody) h.handle(rw, req) @@ -128,7 +128,7 @@ func testHandler(t *testing.T, version Version, nodeInfo *NodeInfo, expected str require.NotNil(t, h) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, "https://example.com/nodeinfo", nil) + req := httptest.NewRequest(http.MethodGet, "https://example.com/nodeinfo", http.NoBody) h.handle(rw, req) diff --git a/pkg/observability/loglevels/loglevels_test.go b/pkg/observability/loglevels/loglevels_test.go index de4ca75c0..fc75c75de 100644 --- a/pkg/observability/loglevels/loglevels_test.go +++ b/pkg/observability/loglevels/loglevels_test.go @@ -38,7 +38,7 @@ func TestLogLevels(t *testing.T) { require.Equal(t, http.MethodPost, hw.Method()) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, logSpecURL, bytes.NewBuffer([]byte(spec))) + req := httptest.NewRequest(http.MethodPost, logSpecURL, bytes.NewBufferString(spec)) hw.handlePost(rw, req) @@ -77,7 +77,7 @@ func TestLogLevels(t *testing.T) { require.NotNil(t, h.Handler()) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, logSpecURL, bytes.NewBuffer([]byte("module2:INFO"))) + req := httptest.NewRequest(http.MethodPost, logSpecURL, bytes.NewBufferString("module2:INFO")) h.handlePost(rw, req) @@ -97,7 +97,7 @@ func TestLogLevels(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, logSpecURL, bytes.NewBuffer([]byte(`INFO`))) + req := httptest.NewRequest(http.MethodPost, logSpecURL, bytes.NewBufferString(`INFO`)) h.handlePost(rw, req) diff --git a/pkg/protocolversion/versions/test/v_test/client/client.go b/pkg/protocolversion/versions/test/v_test/client/client.go index 643bfe907..1d18ba176 100644 --- a/pkg/protocolversion/versions/test/v_test/client/client.go +++ b/pkg/protocolversion/versions/test/v_test/client/client.go @@ -7,12 +7,12 @@ SPDX-License-Identifier: Apache-2.0 package client import ( - "github.com/trustbloc/sidetree-go/pkg/api/protocol" "github.com/trustbloc/sidetree-go/pkg/versions/1_0/doccomposer" "github.com/trustbloc/sidetree-go/pkg/versions/1_0/doctransformer/didtransformer" "github.com/trustbloc/sidetree-go/pkg/versions/1_0/docvalidator/didvalidator" "github.com/trustbloc/sidetree-go/pkg/versions/1_0/operationapplier" "github.com/trustbloc/sidetree-go/pkg/versions/1_0/operationparser" + "github.com/trustbloc/sidetree-svc-go/pkg/api/protocol" "github.com/trustbloc/sidetree-svc-go/pkg/compression" "github.com/trustbloc/sidetree-svc-go/pkg/versions/1_0/txnprovider" diff --git a/pkg/util/util.go b/pkg/util/util.go index 8a6e5fae0..324491462 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -35,7 +35,7 @@ func EncodePublicKeyToPEM(pubKeyBytes []byte, keyType kms.KeyType) ([]byte, erro return nil, fmt.Errorf("parse PKIX public key: %w", err) } - //nolint:forcetypeassert + //nolint:forcetypeassert,staticcheck keyBytes = elliptic.Marshal(curveMap[pemKeyType], key.(*ecdsa.PublicKey).X, key.(*ecdsa.PublicKey).Y) } diff --git a/pkg/util/util_test.go b/pkg/util/util_test.go index 109eebaf9..397d8565d 100644 --- a/pkg/util/util_test.go +++ b/pkg/util/util_test.go @@ -21,7 +21,7 @@ func TestEncodePublicKeyToPEM(t *testing.T) { privKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) require.NoError(t, err) - pubKey := elliptic.Marshal(elliptic.P256(), privKey.PublicKey.X, privKey.PublicKey.Y) + pubKey := elliptic.Marshal(elliptic.P256(), privKey.PublicKey.X, privKey.PublicKey.Y) //nolint:staticcheck pem, err := EncodePublicKeyToPEM(pubKey, kms.ECDSAP256IEEEP1363) require.NoError(t, err) diff --git a/pkg/vct/logmonitoring/monitor_test.go b/pkg/vct/logmonitoring/monitor_test.go index d673d7131..a0554235a 100644 --- a/pkg/vct/logmonitoring/monitor_test.go +++ b/pkg/vct/logmonitoring/monitor_test.go @@ -2878,7 +2878,7 @@ func TestClient_GetPublicKey(t *testing.T) { t.Run("error - no public key", func(t *testing.T) { vctClient := vct.New(testLog, vct.WithHTTPClient(httpMock(func(req *http.Request) (*http.Response, error) { return &http.Response{ - Body: io.NopCloser(bytes.NewBuffer([]byte("{}"))), + Body: io.NopCloser(bytes.NewBufferString("{}")), StatusCode: http.StatusOK, }, nil }))) diff --git a/pkg/vct/logmonitoring/resthandler/retriever_test.go b/pkg/vct/logmonitoring/resthandler/retriever_test.go index e808d4972..196542b9c 100644 --- a/pkg/vct/logmonitoring/resthandler/retriever_test.go +++ b/pkg/vct/logmonitoring/resthandler/retriever_test.go @@ -38,7 +38,7 @@ func TestLogRetriever(t *testing.T) { }) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint, nil) + req := httptest.NewRequest(http.MethodGet, endpoint, http.NoBody) handler.handle(rw, req) @@ -62,7 +62,7 @@ func TestLogRetriever(t *testing.T) { handler := NewRetriever(&mockLogMonitorStore{ActiveLogs: []*logmonitor.LogMonitor{{Log: "https://vct.com/log"}}}) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint+"?status=active", nil) + req := httptest.NewRequest(http.MethodGet, endpoint+"?status=active", http.NoBody) handler.handle(rw, req) @@ -85,7 +85,7 @@ func TestLogRetriever(t *testing.T) { handler := NewRetriever(&mockLogMonitorStore{InactiveLogs: []*logmonitor.LogMonitor{{Log: "https://vct.com/log"}}}) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint+"?status=inactive", nil) + req := httptest.NewRequest(http.MethodGet, endpoint+"?status=inactive", http.NoBody) handler.handle(rw, req) @@ -108,7 +108,7 @@ func TestLogRetriever(t *testing.T) { handler := NewRetriever(&mockLogMonitorStore{InactiveLogs: []*logmonitor.LogMonitor{{Log: "https://vct.com/log"}}}) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint+"?status=invalid", nil) + req := httptest.NewRequest(http.MethodGet, endpoint+"?status=invalid", http.NoBody) handler.handle(rw, req) @@ -126,7 +126,7 @@ func TestLogRetriever(t *testing.T) { handler := NewRetriever(&mockLogMonitorStore{Err: orberrors.ErrContentNotFound}) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint+"?status=active", nil) + req := httptest.NewRequest(http.MethodGet, endpoint+"?status=active", http.NoBody) handler.handle(rw, req) @@ -144,7 +144,7 @@ func TestLogRetriever(t *testing.T) { handler := NewRetriever(&mockLogMonitorStore{Err: orberrors.ErrContentNotFound}) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint+"?status=inactive", nil) + req := httptest.NewRequest(http.MethodGet, endpoint+"?status=inactive", http.NoBody) handler.handle(rw, req) @@ -162,7 +162,7 @@ func TestLogRetriever(t *testing.T) { handler := NewRetriever(&mockLogMonitorStore{ActiveLogs: []*logmonitor.LogMonitor{{Log: "https://vct.com/log"}}}) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint+"?status=active", nil) + req := httptest.NewRequest(http.MethodGet, endpoint+"?status=active", http.NoBody) errExpected := fmt.Errorf("injected unmarshal error") diff --git a/pkg/vct/logmonitoring/resthandler/update_test.go b/pkg/vct/logmonitoring/resthandler/update_test.go index 3f69bee62..6ebca1c0f 100644 --- a/pkg/vct/logmonitoring/resthandler/update_test.go +++ b/pkg/vct/logmonitoring/resthandler/update_test.go @@ -39,7 +39,7 @@ func TestActivate(t *testing.T) { require.NotNil(t, handler) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(activatePayload))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString(activatePayload)) handler.handle(rw, req) @@ -77,7 +77,7 @@ func TestActivate(t *testing.T) { require.NotNil(t, handler) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(activatePayload))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString(activatePayload)) errExpected := fmt.Errorf("injected unmarshal error") @@ -123,7 +123,7 @@ func TestActivate(t *testing.T) { require.NotNil(t, handler) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(activatePayload))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString(activatePayload)) handler.handle(rw, req) @@ -144,7 +144,7 @@ func TestDeactivate(t *testing.T) { require.NotNil(t, handler) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(deactivatePayload))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString(deactivatePayload)) handler.handle(rw, req) @@ -203,7 +203,7 @@ func TestDeactivate(t *testing.T) { require.NotNil(t, handler) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(deactivatePayload))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString(deactivatePayload)) handler.handle(rw, req) @@ -224,7 +224,7 @@ func TestActivateAndDeactivate(t *testing.T) { require.NotNil(t, handler) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(testPayload))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString(testPayload)) handler.handle(rw, req) diff --git a/pkg/vct/resthandler/configurator_test.go b/pkg/vct/resthandler/configurator_test.go index 9b2fcc6eb..f27d14451 100644 --- a/pkg/vct/resthandler/configurator_test.go +++ b/pkg/vct/resthandler/configurator_test.go @@ -46,7 +46,7 @@ func TestHandler(t *testing.T) { require.NotNil(t, logConfigurator) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(testLogURL))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString(testLogURL)) logConfigurator.handle(rw, req) @@ -68,7 +68,7 @@ func TestHandler(t *testing.T) { require.NotNil(t, logConfigurator) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(""))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString("")) logConfigurator.handle(rw, req) @@ -112,7 +112,7 @@ func TestHandler(t *testing.T) { require.NotNil(t, logConfigurator) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(":InvalidURL"))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString(":InvalidURL")) logConfigurator.handle(rw, req) @@ -134,7 +134,7 @@ func TestHandler(t *testing.T) { require.NotNil(t, logConfigurator) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(testLogURL))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString(testLogURL)) logConfigurator.handle(rw, req) @@ -161,7 +161,7 @@ func TestHandler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(testLogURL))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString(testLogURL)) logConfigurator.handle(rw, req) @@ -183,7 +183,7 @@ func TestHandler(t *testing.T) { require.NotNil(t, logConfigurator) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBuffer([]byte(testLogURL))) + req := httptest.NewRequest(http.MethodPost, endpoint, bytes.NewBufferString(testLogURL)) logConfigurator.handle(rw, req) diff --git a/pkg/vct/resthandler/retriever_test.go b/pkg/vct/resthandler/retriever_test.go index 771414e0e..375ca2078 100644 --- a/pkg/vct/resthandler/retriever_test.go +++ b/pkg/vct/resthandler/retriever_test.go @@ -45,7 +45,7 @@ func TestLogRetriever_Handler(t *testing.T) { require.NotNil(t, logRetriever) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint, nil) + req := httptest.NewRequest(http.MethodGet, endpoint, http.NoBody) logRetriever.handle(rw, req) @@ -69,7 +69,7 @@ func TestLogRetriever_Handler(t *testing.T) { require.NotNil(t, logRetriever) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint, nil) + req := httptest.NewRequest(http.MethodGet, endpoint, http.NoBody) logRetriever.handle(rw, req) @@ -86,7 +86,7 @@ func TestLogRetriever_Handler(t *testing.T) { require.NotNil(t, logRetriever) rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint, nil) + req := httptest.NewRequest(http.MethodGet, endpoint, http.NoBody) logRetriever.handle(rw, req) @@ -108,7 +108,7 @@ func TestLogRetriever_Handler(t *testing.T) { } rw := httptest.NewRecorder() - req := httptest.NewRequest(http.MethodGet, endpoint, nil) + req := httptest.NewRequest(http.MethodGet, endpoint, http.NoBody) logRetriever.handle(rw, req) diff --git a/pkg/webcas/webcas_internal_test.go b/pkg/webcas/webcas_internal_test.go index bb691bcb8..46b9cfaa4 100644 --- a/pkg/webcas/webcas_internal_test.go +++ b/pkg/webcas/webcas_internal_test.go @@ -52,7 +52,7 @@ func TestWriteResponseFailures(t *testing.T) { &apmocks.AuthTokenMgr{}) rw := &failingResponseWriter{} - req := httptest.NewRequest(http.MethodGet, "/cas", nil) + req := httptest.NewRequest(http.MethodGet, "/cas", http.NoBody) webCAS.Handler()(rw, req) }) @@ -65,7 +65,7 @@ func TestWriteResponseFailures(t *testing.T) { &apmocks.AuthTokenMgr{}) rw := &failingResponseWriter{} - req := httptest.NewRequest(http.MethodGet, "/cas", nil) + req := httptest.NewRequest(http.MethodGet, "/cas", http.NoBody) webCAS.Handler()(rw, req) }) @@ -79,7 +79,7 @@ func TestWriteResponseFailures(t *testing.T) { &apmocks.AuthTokenMgr{}) rw := &failingResponseWriter{} - req := httptest.NewRequest(http.MethodGet, "/cas", nil) + req := httptest.NewRequest(http.MethodGet, "/cas", http.NoBody) webCAS.Handler()(rw, req) }) diff --git a/pkg/webfinger/client/client_test.go b/pkg/webfinger/client/client_test.go index 4f661e410..4b46acdf8 100644 --- a/pkg/webfinger/client/client_test.go +++ b/pkg/webfinger/client/client_test.go @@ -274,7 +274,7 @@ func TestClient_ResolveLog(t *testing.T) { httpClient := httpMock(func(req *http.Request) (*http.Response, error) { return &http.Response{ Body: io.NopCloser( - bytes.NewBufferString(string(respBytes)), + bytes.NewBuffer(respBytes), ), StatusCode: http.StatusOK, }, nil @@ -308,7 +308,7 @@ func TestClient_ResolveLog(t *testing.T) { httpClient := httpMock(func(req *http.Request) (*http.Response, error) { return &http.Response{ Body: io.NopCloser( - bytes.NewBufferString(string(respBytes)), + bytes.NewBuffer(respBytes), ), StatusCode: http.StatusOK, }, nil @@ -374,7 +374,7 @@ func TestClient_ResolveLog(t *testing.T) { httpClient := httpMock(func(req *http.Request) (*http.Response, error) { return &http.Response{ Body: io.NopCloser( - bytes.NewBufferString(string(respBytes)), + bytes.NewBuffer(respBytes), ), StatusCode: http.StatusOK, }, nil diff --git a/scripts/build-cli.sh b/scripts/build-cli.sh index 671506763..6adcbecee 100755 --- a/scripts/build-cli.sh +++ b/scripts/build-cli.sh @@ -25,7 +25,7 @@ cd .build/dist/bin;tar cvzf orb-cli-linux-arm64.tar.gz orb-cli-linux-arm64;rm -r cd /opt/workspace/orb -cd cmd/orb-cli/;CC=aarch64-apple-darwin20.2-clang CXX=aarch64-apple-darwin20.2-clang++ CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -o ../../.build/dist/bin/orb-cli-darwin-arm64 main.go +cd cmd/orb-cli/;CC=o64-clang CXX=o64-clang++ CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -o ../../.build/dist/bin/orb-cli-darwin-arm64 main.go cd /opt/workspace/orb cd .build/dist/bin;tar cvzf orb-cli-darwin-arm64.tar.gz orb-cli-darwin-arm64;rm -rf orb-cli-darwin-arm64 cd /opt/workspace/orb diff --git a/scripts/check_lint.sh b/scripts/check_lint.sh index 312e2ceb2..6d0bb6a2c 100755 --- a/scripts/check_lint.sh +++ b/scripts/check_lint.sh @@ -10,7 +10,7 @@ set -e echo "Running $0" DOCKER_CMD=${DOCKER_CMD:-docker} -GOLANGCI_LINT_IMAGE="golangci/golangci-lint:v1.52" +GOLANGCI_LINT_IMAGE="golangci/golangci-lint:v1.54.2" if [ ! $(command -v ${DOCKER_CMD}) ]; then exit 0 diff --git a/scripts/unit.sh b/scripts/unit.sh index 57d4bb9e1..0ef903be1 100755 --- a/scripts/unit.sh +++ b/scripts/unit.sh @@ -18,7 +18,7 @@ if [ -f profile.out ]; then fi } -# Running edge-service unit tests +# Running pkg unit tests PKGS=`go list github.com/trustbloc/orb/... 2> /dev/null | \ grep -v /mocks` go test $PKGS -count=1 -race -coverprofile=profile.out -covermode=atomic -timeout=10m diff --git a/test/bdd/go.mod b/test/bdd/go.mod index 35d005d3b..5ee70f212 100644 --- a/test/bdd/go.mod +++ b/test/bdd/go.mod @@ -16,10 +16,10 @@ require ( github.com/google/uuid v1.3.0 github.com/greenpau/go-calculator v1.0.1 github.com/hyperledger/aries-framework-go v0.3.3-0.20230901120639-e17eddd3ad3e - github.com/hyperledger/aries-framework-go-ext/component/storage/couchdb v0.0.0-20220428163625-96d8261511e1 - github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf - github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20230612123444-d285f3c85595 - github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20230612123444-d285f3c85595 + github.com/hyperledger/aries-framework-go-ext/component/storage/couchdb v0.0.0-20231002134513-a3b96bcbb37c + github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c + github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20231002134513-a3b96bcbb37c + github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20231002134513-a3b96bcbb37c github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20230427134832-0c9969493bd3 github.com/hyperledger/aries-framework-go/spi v0.0.0-20230901120639-e17eddd3ad3e github.com/igor-pavlenko/httpsignatures-go v0.0.23 @@ -27,7 +27,7 @@ require ( github.com/mr-tron/base58 v1.2.0 github.com/sirupsen/logrus v1.8.1 github.com/tidwall/gjson v1.14.3 - github.com/trustbloc/orb v1.0.0-rc7 + github.com/trustbloc/orb v1.0.1-0.20230929144409-1e0e7e685841 github.com/trustbloc/sidetree-go v0.0.0-20230928172705-30e78b6b6ddd ) diff --git a/test/bdd/go.sum b/test/bdd/go.sum index 5e164ed55..7659f12bd 100644 --- a/test/bdd/go.sum +++ b/test/bdd/go.sum @@ -697,12 +697,14 @@ github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63 github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hyperledger/aries-framework-go v0.3.3-0.20230901120639-e17eddd3ad3e h1:2QRDh/BG6aQaIwHPSLfEZHBvnyP7wAD3lzn/CCa7cp4= github.com/hyperledger/aries-framework-go v0.3.3-0.20230901120639-e17eddd3ad3e/go.mod h1:uH0Od/EyS1bQkW1BWo8qqz8szU3VEpNK1YXR1SJgqK4= -github.com/hyperledger/aries-framework-go-ext/component/storage/couchdb v0.0.0-20220428163625-96d8261511e1 h1:J17kEzMu0cA2xsgC0VcZiKu9ivV0/WMMmeCW7UrfQ1Y= -github.com/hyperledger/aries-framework-go-ext/component/storage/couchdb v0.0.0-20220428163625-96d8261511e1/go.mod h1:q8qjsQpYo7AYG0pqQg1zgEoIVc+Hrpf5S0WciiwPDQA= -github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf h1:F12zbOSRsye3IWK3Zb6prgrqQQFYnz5zjGSCh9pfYzk= -github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220615170242-cda5092b4faf/go.mod h1:GDANCnJONcCqBvv6QgKuk5Y2FWHyD/Hu26kyc7NTyfY= -github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20230612123444-d285f3c85595/go.mod h1:TwEnYh669P6PdnjHHSCXI5Dy00vo5vjdCHttmwpXLXI= -github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20230612123444-d285f3c85595/go.mod h1:HnHKv7F2AWSrzbBLQ/Q0T3b4Xq841T7joJizZXPMAXE= +github.com/hyperledger/aries-framework-go-ext/component/storage/couchdb v0.0.0-20231002134513-a3b96bcbb37c h1:M/Q//j6EnNrf2ZWpjp6GvWqohDxMROa2Qv1p0dHcUCo= +github.com/hyperledger/aries-framework-go-ext/component/storage/couchdb v0.0.0-20231002134513-a3b96bcbb37c/go.mod h1:q8qjsQpYo7AYG0pqQg1zgEoIVc+Hrpf5S0WciiwPDQA= +github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c h1:4y0CFPFyoA3Jd7EzY2NqC31bILuMe2xXAqWm0s1RJuU= +github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20231002134513-a3b96bcbb37c/go.mod h1:GDANCnJONcCqBvv6QgKuk5Y2FWHyD/Hu26kyc7NTyfY= +github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20231002134513-a3b96bcbb37c h1:hNwp043Ba/3TwDLpQAS9tqN0zQCFdnBYTy1NWXFtQNM= +github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20231002134513-a3b96bcbb37c/go.mod h1:pURPg3cSdbs1yhGXCbOzeXHr7M4OHbN3HEuXOg7kEd0= +github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20231002134513-a3b96bcbb37c h1:HqDYWlytUw+xMS4THsHcovcS/hdnFko06Dpi5JrjsiE= +github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc4.0.20231002134513-a3b96bcbb37c/go.mod h1:vQBl9EQq2V6MHAwUbr+rnExJEGp2EXnaxDcaEKCEKd4= github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230901120639-e17eddd3ad3e h1:rWchzRr9jP8a9ggR/y8vdIGLvGrij1auh58v10eIgik= github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230901120639-e17eddd3ad3e/go.mod h1:nmT2WqhIs9Eyncdr9feYrUIy7ggf00bWnTzCN6/t8PY= github.com/hyperledger/aries-framework-go/component/log v0.0.0-20230901120639-e17eddd3ad3e h1:q6/fpTbRpVJq4vDcapAGybUeg9ud1F4Arlpz8Ru+YZU= diff --git a/test/bdd/httpclient.go b/test/bdd/httpclient.go index 851b75df9..9f5fffddf 100644 --- a/test/bdd/httpclient.go +++ b/test/bdd/httpclient.go @@ -70,7 +70,7 @@ func (c *httpClient) GetWithSignature(url, domain string) (*httpResponse, error) url = c.resolveURL(url) - httpReq, err := http.NewRequest(http.MethodGet, url, nil) + httpReq, err := http.NewRequest(http.MethodGet, url, http.NoBody) if err != nil { return nil, err } diff --git a/test/bdd/stress_steps.go b/test/bdd/stress_steps.go index 2c43b8f4b..43a4d7e27 100644 --- a/test/bdd/stress_steps.go +++ b/test/bdd/stress_steps.go @@ -391,7 +391,7 @@ func (e *StressSteps) createVerificationMethod(keyType string, pubKey []byte, ki switch keyType { case P256KeyType: - x, y := elliptic.Unmarshal(elliptic.P256(), pubKey) + x, y := elliptic.Unmarshal(elliptic.P256(), pubKey) //nolint:staticcheck jwk, err = jwksupport.JWKFromKey(&ecdsa.PublicKey{X: x, Y: y, Curve: elliptic.P256()}) if err != nil {