Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removing mgo references by upgrading mgo dependent pkgs to the versions using mongo-go-driver #184

Merged
merged 5 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
fail-fast: false
matrix:
go:
- "1.20"
- "1.21"
- "1.22"
steps:
- uses: actions/checkout@v3

Expand All @@ -41,5 +41,5 @@ jobs:
with:
main_branch: master
cov_file: unit_coverage.out
cov_threshold: "91"
cov_threshold: "90"
cov_mode: coverage
1 change: 1 addition & 0 deletions authorizer/mtls/authorizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"reflect"
"testing"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/bahamut"
"go.aporeto.io/elemental"
Expand Down
1 change: 1 addition & 0 deletions authorizer/simple/authenticator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"fmt"
"testing"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/bahamut"
)
Expand Down
1 change: 1 addition & 0 deletions authorizer/simple/authorizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"fmt"
"testing"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/bahamut"
)
Expand Down
1 change: 1 addition & 0 deletions authorizer/simple/publishhandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"fmt"
"testing"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/elemental"
)
Expand Down
1 change: 1 addition & 0 deletions bahamut_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"net/http"
"testing"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/elemental"
testmodel "go.aporeto.io/elemental/test/model"
Expand Down
1 change: 1 addition & 0 deletions context_mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"net/http"
"testing"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/elemental"
testmodel "go.aporeto.io/elemental/test/model"
Expand Down
1 change: 1 addition & 0 deletions context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"net/url"
"testing"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/elemental"
testmodel "go.aporeto.io/elemental/test/model"
Expand Down
1 change: 1 addition & 0 deletions cors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"net/http"
"testing"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
)

Expand Down
12 changes: 7 additions & 5 deletions dispatchers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ package bahamut
import (
"context"
"encoding/json"
"errors"
"fmt"
"net/http"
"testing"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/elemental"
testmodel "go.aporeto.io/elemental/test/model"
Expand Down Expand Up @@ -608,7 +610,7 @@ func TestDispatchers_dispatchCreateOperation(t *testing.T) {
processorFinder,
testmodel.Manager(),
func(*elemental.Request) (elemental.Identifiable, error) {
return nil, fmt.Errorf(expectedError)
return nil, fmt.Errorf(expectedError) //nolint:staticcheck
},
nil,
nil,
Expand Down Expand Up @@ -1051,7 +1053,7 @@ func TestDispatchers_dispatchUpdateOperation(t *testing.T) {
processorFinder,
testmodel.Manager(),
func(*elemental.Request) (elemental.Identifiable, error) {
return nil, fmt.Errorf(expectedError)
return nil, fmt.Errorf(expectedError) //nolint:staticcheck
},
nil,
nil,
Expand Down Expand Up @@ -1628,7 +1630,7 @@ func TestDispatchers_dispatchPatchOperation(t *testing.T) {
processorFinder,
testmodel.Manager(),
func(*elemental.Request) (elemental.Identifiable, error) {
return nil, fmt.Errorf(expectedError)
return nil, fmt.Errorf(expectedError) //nolint:staticcheck
},
nil,
nil,
Expand Down Expand Up @@ -1746,7 +1748,7 @@ func TestDispatchers_dispatchPatchOperation(t *testing.T) {
var retrieverCalled int
retriever := func(req *elemental.Request) (elemental.Identifiable, error) {
retrieverCalled++
return nil, fmt.Errorf("oh noes")
return nil, errors.New("oh noes")
}

auditer := &mockAuditer{}
Expand Down Expand Up @@ -1854,7 +1856,7 @@ func TestDispatchers_dispatchPatchOperation(t *testing.T) {

processorFinder := func(identity elemental.Identity) (Processor, error) {
return &mockProcessor{
err: fmt.Errorf("this is an error"),
err: errors.New("this is an error"),
}, nil
}

Expand Down
1 change: 1 addition & 0 deletions gateway/buffers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package gateway
import (
"testing"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
)

Expand Down
1 change: 1 addition & 0 deletions gateway/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"testing"

"github.com/mailgun/multibuf"
// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"github.com/vulcand/oxy/ratelimit"
"github.com/vulcand/oxy/v2/connlimit"
Expand Down
1 change: 1 addition & 0 deletions gateway/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"time"

"github.com/opentracing/opentracing-go"
// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/bahamut"
"go.aporeto.io/tg/tglib"
Expand Down
1 change: 1 addition & 0 deletions gateway/listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"testing"
"time"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
)

Expand Down
1 change: 1 addition & 0 deletions gateway/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"testing"
"time"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/bahamut"
"golang.org/x/time/rate"
Expand Down
1 change: 1 addition & 0 deletions gateway/rewriters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"strings"
"testing"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/tg/tglib"
)
Expand Down
1 change: 1 addition & 0 deletions gateway/upstreamer/push/movingaverage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package push
import (
"testing"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
)

Expand Down
1 change: 1 addition & 0 deletions gateway/upstreamer/push/notifier_options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"testing"
"time"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/elemental"
"golang.org/x/time/rate"
Expand Down
1 change: 1 addition & 0 deletions gateway/upstreamer/push/notifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"
"time"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/bahamut"
"go.aporeto.io/elemental"
Expand Down
1 change: 1 addition & 0 deletions gateway/upstreamer/push/services_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"testing"
"time"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"golang.org/x/time/rate"
)
Expand Down
1 change: 1 addition & 0 deletions gateway/upstreamer/push/upstreamer_distribution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"testing"
"time"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"golang.org/x/time/rate"
)
Expand Down
1 change: 1 addition & 0 deletions gateway/upstreamer/push/upstreamer_options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"
"time"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
)

Expand Down
1 change: 1 addition & 0 deletions gateway/upstreamer/push/upstreamer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"testing"
"time"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/bahamut"
"go.aporeto.io/bahamut/gateway"
Expand Down
1 change: 1 addition & 0 deletions gateway/upstreamer/push/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"testing"
"time"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/bahamut"
)
Expand Down
1 change: 1 addition & 0 deletions gateway/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"testing"
"time"

// nolint:revive // Allow dot imports for readability in tests
. "github.com/smartystreets/goconvey/convey"
"go.aporeto.io/bahamut"
"go.aporeto.io/tg/tglib"
Expand Down
16 changes: 9 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
module go.aporeto.io/bahamut

go 1.20
go 1.22

toolchain go1.22.2

require (
go.aporeto.io/elemental v1.123.0
go.aporeto.io/elemental v1.123.1-0.20240822212917-6f8c7be6698c
go.aporeto.io/tg v1.50.0
go.aporeto.io/wsc v1.51.0
)
Expand Down Expand Up @@ -36,7 +38,6 @@ require (
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect
Expand All @@ -63,11 +64,12 @@ require (
github.com/ugorji/go/codec v1.2.9 // indirect
github.com/vulcand/predicate v1.2.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.mongodb.org/mongo-driver v1.16.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
Loading
Loading