Skip to content

🎧 Your Personal Streaming Service

Upgrade Ginkgo to V2

Deluan31882abf6fb5
diff --git a/Makefile b/Makefile
index 8c42e1705..df6856611 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ server: check_go_env ##@Development Start the backend in development mode
.PHONY: server
watch: ##@Development Start Go tests in watch mode (re-run when code changes)
- go run github.com/onsi/ginkgo/ginkgo watch -notify ./...
+ go run github.com/onsi/ginkgo/v2/ginkgo watch -notify ./...
.PHONY: watch
test: ##@Development Run Go tests
@@ -49,7 +49,7 @@ wire: check_go_env ##@Development Update Dependency Injection
.PHONY: wire
snapshots: ##@Development Update (GoLang) Snapshot tests
- UPDATE_SNAPSHOTS=true go run github.com/onsi/ginkgo/ginkgo ./server/subsonic/...
+ UPDATE_SNAPSHOTS=true go run github.com/onsi/ginkgo/v2/ginkgo ./server/subsonic/...
.PHONY: snapshots
migration: ##@Development Create an empty migration file
diff --git a/core/agents/agents_suite_test.go b/core/agents/agents_suite_test.go
index bba05b03a..3d225b07c 100644
--- a/core/agents/agents_suite_test.go
+++ b/core/agents/agents_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/agents/agents_test.go b/core/agents/agents_test.go
index b25727b88..f038d637a 100644
--- a/core/agents/agents_test.go
+++ b/core/agents/agents_test.go
@@ -8,7 +8,7 @@ import (
"github.com/navidrome/navidrome/tests"
"github.com/navidrome/navidrome/conf"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/agents/lastfm/agent_test.go b/core/agents/lastfm/agent_test.go
index 68113eab4..1e399c8b8 100644
--- a/core/agents/lastfm/agent_test.go
+++ b/core/agents/lastfm/agent_test.go
@@ -15,7 +15,7 @@ import (
"github.com/navidrome/navidrome/core/scrobbler"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/agents/lastfm/client_test.go b/core/agents/lastfm/client_test.go
index 79bb44830..e08955fac 100644
--- a/core/agents/lastfm/client_test.go
+++ b/core/agents/lastfm/client_test.go
@@ -12,7 +12,7 @@ import (
"os"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/agents/lastfm/lastfm_suite_test.go b/core/agents/lastfm/lastfm_suite_test.go
index 9be5fabe9..db09226e5 100644
--- a/core/agents/lastfm/lastfm_suite_test.go
+++ b/core/agents/lastfm/lastfm_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/agents/lastfm/responses_test.go b/core/agents/lastfm/responses_test.go
index 62b2aae1a..1601e7d4d 100644
--- a/core/agents/lastfm/responses_test.go
+++ b/core/agents/lastfm/responses_test.go
@@ -4,7 +4,7 @@ import (
"encoding/json"
"os"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/agents/listenbrainz/agent_test.go b/core/agents/listenbrainz/agent_test.go
index 6f7928311..657d07786 100644
--- a/core/agents/listenbrainz/agent_test.go
+++ b/core/agents/listenbrainz/agent_test.go
@@ -11,7 +11,7 @@ import (
"github.com/navidrome/navidrome/core/scrobbler"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gstruct"
)
diff --git a/core/agents/listenbrainz/auth_router_test.go b/core/agents/listenbrainz/auth_router_test.go
index 5eb164c94..522369b48 100644
--- a/core/agents/listenbrainz/auth_router_test.go
+++ b/core/agents/listenbrainz/auth_router_test.go
@@ -10,7 +10,7 @@ import (
"strings"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/agents/listenbrainz/client_test.go b/core/agents/listenbrainz/client_test.go
index daeeca3bf..a7970431b 100644
--- a/core/agents/listenbrainz/client_test.go
+++ b/core/agents/listenbrainz/client_test.go
@@ -9,7 +9,7 @@ import (
"os"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/agents/listenbrainz/listenbrainz_suite_test.go b/core/agents/listenbrainz/listenbrainz_suite_test.go
index 3710f81bd..69cb9746b 100644
--- a/core/agents/listenbrainz/listenbrainz_suite_test.go
+++ b/core/agents/listenbrainz/listenbrainz_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/agents/session_keys_test.go b/core/agents/session_keys_test.go
index 84f440662..e0232c08e 100644
--- a/core/agents/session_keys_test.go
+++ b/core/agents/session_keys_test.go
@@ -6,7 +6,7 @@ import (
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/agents/spotify/client_test.go b/core/agents/spotify/client_test.go
index afce3bdeb..a333cc54a 100644
--- a/core/agents/spotify/client_test.go
+++ b/core/agents/spotify/client_test.go
@@ -7,7 +7,7 @@ import (
"net/http"
"os"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/agents/spotify/responses_test.go b/core/agents/spotify/responses_test.go
index f8bcfb1b5..704119816 100644
--- a/core/agents/spotify/responses_test.go
+++ b/core/agents/spotify/responses_test.go
@@ -4,7 +4,7 @@ import (
"encoding/json"
"os"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/agents/spotify/spotify_suite_test.go b/core/agents/spotify/spotify_suite_test.go
index aa1999077..1c8038e96 100644
--- a/core/agents/spotify/spotify_suite_test.go
+++ b/core/agents/spotify/spotify_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/artwork_test.go b/core/artwork_test.go
index 5d1c846c6..609b4ce3e 100644
--- a/core/artwork_test.go
+++ b/core/artwork_test.go
@@ -9,7 +9,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/auth/auth_test.go b/core/auth/auth_test.go
index ff55e42fd..0ac10ebe9 100644
--- a/core/auth/auth_test.go
+++ b/core/auth/auth_test.go
@@ -10,7 +10,7 @@ import (
"github.com/navidrome/navidrome/core/auth"
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
@@ -25,10 +25,11 @@ const (
oneDay = 24 * time.Hour
)
+var _ = BeforeSuite(func() {
+ conf.Server.SessionTimeout = 2 * oneDay
+})
+
var _ = Describe("Auth", func() {
- BeforeSuite(func() {
- conf.Server.SessionTimeout = 2 * oneDay
- })
BeforeEach(func() {
auth.Secret = []byte(testJWTSecret)
diff --git a/core/core_suite_test.go b/core/core_suite_test.go
index 5f2c709d8..fdb792d98 100644
--- a/core/core_suite_test.go
+++ b/core/core_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/media_streamer_test.go b/core/media_streamer_test.go
index 37ecc0322..3fedd42c2 100644
--- a/core/media_streamer_test.go
+++ b/core/media_streamer_test.go
@@ -11,7 +11,7 @@ import (
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/model/request"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/players_test.go b/core/players_test.go
index d04401955..22bac5584 100644
--- a/core/players_test.go
+++ b/core/players_test.go
@@ -8,7 +8,7 @@ import (
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/model/request"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/playlists_test.go b/core/playlists_test.go
index 8aafabb7f..56486961c 100644
--- a/core/playlists_test.go
+++ b/core/playlists_test.go
@@ -6,7 +6,7 @@ import (
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/scrobbler/play_tracker_test.go b/core/scrobbler/play_tracker_test.go
index 97b5813cb..f7412a01f 100644
--- a/core/scrobbler/play_tracker_test.go
+++ b/core/scrobbler/play_tracker_test.go
@@ -12,7 +12,7 @@ import (
"github.com/navidrome/navidrome/model/request"
"github.com/navidrome/navidrome/server/events"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/scrobbler/scrobbler_suite_test.go b/core/scrobbler/scrobbler_suite_test.go
index d32028ab5..6963f6c34 100644
--- a/core/scrobbler/scrobbler_suite_test.go
+++ b/core/scrobbler/scrobbler_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/share_test.go b/core/share_test.go
index 98f51fee6..bc4f6c74b 100644
--- a/core/share_test.go
+++ b/core/share_test.go
@@ -6,7 +6,7 @@ import (
"github.com/deluan/rest"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/core/transcoder/transcoder_test.go b/core/transcoder/transcoder_test.go
index 23adfd1f4..a91d3b6bc 100644
--- a/core/transcoder/transcoder_test.go
+++ b/core/transcoder/transcoder_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/db/db_test.go b/db/db_test.go
index d24934884..504152603 100644
--- a/db/db_test.go
+++ b/db/db_test.go
@@ -6,7 +6,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/go.mod b/go.mod
index 16e6a44eb..826a4555e 100644
--- a/go.mod
+++ b/go.mod
@@ -33,7 +33,7 @@ require (
github.com/microcosm-cc/bluemonday v1.0.17
github.com/mileusna/useragent v1.1.0
github.com/oklog/run v1.1.0
- github.com/onsi/ginkgo v1.16.5
+ github.com/onsi/ginkgo/v2 v2.1.4
github.com/onsi/gomega v1.20.0
github.com/pressly/goose v2.7.0+incompatible
github.com/robfig/cron/v3 v3.0.1
@@ -113,6 +113,7 @@ require (
github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2 // indirect
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
github.com/google/go-cmp v0.5.8 // indirect
+ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/google/subcommands v1.0.1 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect
github.com/gorilla/css v1.0.0 // indirect
@@ -166,9 +167,9 @@ require (
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
github.com/nishanths/exhaustive v0.8.1 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
- github.com/nxadm/tail v1.4.8 // indirect
github.com/ogier/pflag v0.0.1 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
+ github.com/onsi/ginkgo v1.16.5 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
@@ -223,10 +224,9 @@ require (
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
- golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
+ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
- gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
honnef.co/go/tools v0.3.2 // indirect
diff --git a/go.sum b/go.sum
index cc74d8c6a..3dcd8d686 100644
--- a/go.sum
+++ b/go.sum
@@ -371,6 +371,7 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/subcommands v1.0.1 h1:/eqq+otEXm5vhfBrbREPCSVQbvofip6kIz+mX5TUH7k=
@@ -1100,8 +1101,9 @@ golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
diff --git a/log/formatters_test.go b/log/formatters_test.go
index a084c538f..61967dc25 100644
--- a/log/formatters_test.go
+++ b/log/formatters_test.go
@@ -3,7 +3,7 @@ package log
import (
"time"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/log/log_test.go b/log/log_test.go
index 42f681b8e..3c4cde545 100644
--- a/log/log_test.go
+++ b/log/log_test.go
@@ -6,7 +6,7 @@ import (
"net/http/httptest"
"testing"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/sirupsen/logrus"
"github.com/sirupsen/logrus/hooks/test"
diff --git a/model/criteria/criteria_suite_test.go b/model/criteria/criteria_suite_test.go
index bc26fe1bd..9afe91671 100644
--- a/model/criteria/criteria_suite_test.go
+++ b/model/criteria/criteria_suite_test.go
@@ -5,7 +5,7 @@ import (
_ "github.com/mattn/go-sqlite3"
"github.com/navidrome/navidrome/log"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
)
diff --git a/model/criteria/criteria_test.go b/model/criteria/criteria_test.go
index 6ac2eb7c5..839989221 100644
--- a/model/criteria/criteria_test.go
+++ b/model/criteria/criteria_test.go
@@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
)
diff --git a/model/criteria/operators_test.go b/model/criteria/operators_test.go
index fcf41009c..2b5f2203b 100644
--- a/model/criteria/operators_test.go
+++ b/model/criteria/operators_test.go
@@ -5,8 +5,7 @@ import (
"fmt"
"time"
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/ginkgo/extensions/table"
+ . "github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
)
diff --git a/model/model_suite_test.go b/model/model_suite_test.go
index bc2658e14..fb740b09a 100644
--- a/model/model_suite_test.go
+++ b/model/model_suite_test.go
@@ -6,7 +6,7 @@ import (
_ "github.com/mattn/go-sqlite3"
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/persistence/album_repository_test.go b/persistence/album_repository_test.go
index 3f67282f0..5f1f8b500 100644
--- a/persistence/album_repository_test.go
+++ b/persistence/album_repository_test.go
@@ -11,7 +11,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/model/request"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/persistence/artist_repository_test.go b/persistence/artist_repository_test.go
index e00db60c1..184d78b98 100644
--- a/persistence/artist_repository_test.go
+++ b/persistence/artist_repository_test.go
@@ -7,7 +7,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/model/request"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gstruct"
)
diff --git a/persistence/genre_repository_test.go b/persistence/genre_repository_test.go
index 4d3b8fa40..2f5b059dc 100644
--- a/persistence/genre_repository_test.go
+++ b/persistence/genre_repository_test.go
@@ -7,7 +7,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/persistence"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/persistence/helpers_test.go b/persistence/helpers_test.go
index 3b4469d8a..0265a24fc 100644
--- a/persistence/helpers_test.go
+++ b/persistence/helpers_test.go
@@ -6,7 +6,7 @@ import (
"github.com/Masterminds/squirrel"
"github.com/navidrome/navidrome/model"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/persistence/mediafile_repository_test.go b/persistence/mediafile_repository_test.go
index bfb0744fc..485782257 100644
--- a/persistence/mediafile_repository_test.go
+++ b/persistence/mediafile_repository_test.go
@@ -10,7 +10,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/model/request"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/persistence/persistence_suite_test.go b/persistence/persistence_suite_test.go
index 69f836e22..b184c1c45 100644
--- a/persistence/persistence_suite_test.go
+++ b/persistence/persistence_suite_test.go
@@ -13,7 +13,7 @@ import (
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/model/request"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
@@ -79,101 +79,99 @@ func P(path string) string {
return filepath.FromSlash(path)
}
-var _ = Describe("Initialize test DB", func() {
-
- // TODO Load this data setup from file(s)
- BeforeSuite(func() {
- o := orm.NewOrm()
- ctx := log.NewContext(context.TODO())
- user := model.User{ID: "userid", UserName: "userid"}
- ctx = request.WithUser(ctx, user)
+// Initialize test DB
+// TODO Load this data setup from file(s)
+var _ = BeforeSuite(func() {
+ o := orm.NewOrm()
+ ctx := log.NewContext(context.TODO())
+ user := model.User{ID: "userid", UserName: "userid"}
+ ctx = request.WithUser(ctx, user)
+
+ ur := NewUserRepository(ctx, o)
+ err := ur.Put(&user)
+ if err != nil {
+ panic(err)
+ }
- ur := NewUserRepository(ctx, o)
- err := ur.Put(&user)
+ gr := NewGenreRepository(ctx, o)
+ for i := range testGenres {
+ g := testGenres[i]
+ err := gr.Put(&g)
if err != nil {
panic(err)
}
+ }
- gr := NewGenreRepository(ctx, o)
- for i := range testGenres {
- g := testGenres[i]
- err := gr.Put(&g)
- if err != nil {
- panic(err)
- }
- }
-
- mr := NewMediaFileRepository(ctx, o)
- for i := range testSongs {
- s := testSongs[i]
- err := mr.Put(&s)
- if err != nil {
- panic(err)
- }
- }
-
- alr := NewAlbumRepository(ctx, o).(*albumRepository)
- for i := range testAlbums {
- a := testAlbums[i]
- err := alr.Put(&a)
- if err != nil {
- panic(err)
- }
- }
-
- arr := NewArtistRepository(ctx, o)
- for i := range testArtists {
- a := testArtists[i]
- err := arr.Put(&a)
- if err != nil {
- panic(err)
- }
- }
-
- plsBest = model.Playlist{
- Name: "Best",
- Comment: "No Comments",
- OwnerID: "userid",
- OwnerName: "userid",
- Public: true,
- SongCount: 2,
- }
- plsBest.AddTracks([]string{"1001", "1003"})
- plsCool = model.Playlist{Name: "Cool", OwnerID: "userid", OwnerName: "userid"}
- plsCool.AddTracks([]string{"1004"})
- testPlaylists = []*model.Playlist{&plsBest, &plsCool}
-
- pr := NewPlaylistRepository(ctx, o)
- for i := range testPlaylists {
- err := pr.Put(testPlaylists[i])
- if err != nil {
- panic(err)
- }
+ mr := NewMediaFileRepository(ctx, o)
+ for i := range testSongs {
+ s := testSongs[i]
+ err := mr.Put(&s)
+ if err != nil {
+ panic(err)
}
+ }
- // Prepare annotations
- if err := arr.SetStar(true, artistBeatles.ID); err != nil {
+ alr := NewAlbumRepository(ctx, o).(*albumRepository)
+ for i := range testAlbums {
+ a := testAlbums[i]
+ err := alr.Put(&a)
+ if err != nil {
panic(err)
}
- ar, _ := arr.Get(artistBeatles.ID)
- artistBeatles.Starred = true
- artistBeatles.StarredAt = ar.StarredAt
- testArtists[1] = artistBeatles
+ }
- if err := alr.SetStar(true, albumRadioactivity.ID); err != nil {
+ arr := NewArtistRepository(ctx, o)
+ for i := range testArtists {
+ a := testArtists[i]
+ err := arr.Put(&a)
+ if err != nil {
panic(err)
}
- al, _ := alr.Get(albumRadioactivity.ID)
- albumRadioactivity.Starred = true
- albumRadioactivity.StarredAt = al.StarredAt
- testAlbums[2] = albumRadioactivity
+ }
- if err := mr.SetStar(true, songComeTogether.ID); err != nil {
+ plsBest = model.Playlist{
+ Name: "Best",
+ Comment: "No Comments",
+ OwnerID: "userid",
+ OwnerName: "userid",
+ Public: true,
+ SongCount: 2,
+ }
+ plsBest.AddTracks([]string{"1001", "1003"})
+ plsCool = model.Playlist{Name: "Cool", OwnerID: "userid", OwnerName: "userid"}
+ plsCool.AddTracks([]string{"1004"})
+ testPlaylists = []*model.Playlist{&plsBest, &plsCool}
+
+ pr := NewPlaylistRepository(ctx, o)
+ for i := range testPlaylists {
+ err := pr.Put(testPlaylists[i])
+ if err != nil {
panic(err)
}
- mf, _ := mr.Get(songComeTogether.ID)
- songComeTogether.Starred = true
- songComeTogether.StarredAt = mf.StarredAt
- testSongs[1] = songComeTogether
- })
+ }
+
+ // Prepare annotations
+ if err := arr.SetStar(true, artistBeatles.ID); err != nil {
+ panic(err)
+ }
+ ar, _ := arr.Get(artistBeatles.ID)
+ artistBeatles.Starred = true
+ artistBeatles.StarredAt = ar.StarredAt
+ testArtists[1] = artistBeatles
+
+ if err := alr.SetStar(true, albumRadioactivity.ID); err != nil {
+ panic(err)
+ }
+ al, _ := alr.Get(albumRadioactivity.ID)
+ albumRadioactivity.Starred = true
+ albumRadioactivity.StarredAt = al.StarredAt
+ testAlbums[2] = albumRadioactivity
+
+ if err := mr.SetStar(true, songComeTogether.ID); err != nil {
+ panic(err)
+ }
+ mf, _ := mr.Get(songComeTogether.ID)
+ songComeTogether.Starred = true
+ songComeTogether.StarredAt = mf.StarredAt
+ testSongs[1] = songComeTogether
})
diff --git a/persistence/playlist_repository_test.go b/persistence/playlist_repository_test.go
index 37a8242c9..58b292a61 100644
--- a/persistence/playlist_repository_test.go
+++ b/persistence/playlist_repository_test.go
@@ -7,7 +7,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/model/request"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/persistence/playqueue_repository_test.go b/persistence/playqueue_repository_test.go
index 49089682a..2b3da0786 100644
--- a/persistence/playqueue_repository_test.go
+++ b/persistence/playqueue_repository_test.go
@@ -10,7 +10,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/model/request"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/persistence/property_repository_test.go b/persistence/property_repository_test.go
index d4a589c8a..d1aaa3cd5 100644
--- a/persistence/property_repository_test.go
+++ b/persistence/property_repository_test.go
@@ -6,7 +6,7 @@ import (
"github.com/astaxie/beego/orm"
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/persistence/sql_base_repository_test.go b/persistence/sql_base_repository_test.go
index b88b0af15..42b8bc866 100644
--- a/persistence/sql_base_repository_test.go
+++ b/persistence/sql_base_repository_test.go
@@ -3,7 +3,7 @@ package persistence
import (
"github.com/Masterminds/squirrel"
"github.com/navidrome/navidrome/model"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/persistence/sql_bookmarks_test.go b/persistence/sql_bookmarks_test.go
index 4112b91b7..7e54a1f29 100644
--- a/persistence/sql_bookmarks_test.go
+++ b/persistence/sql_bookmarks_test.go
@@ -7,7 +7,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/model/request"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/persistence/sql_restful_test.go b/persistence/sql_restful_test.go
index 429813b08..637ac3446 100644
--- a/persistence/sql_restful_test.go
+++ b/persistence/sql_restful_test.go
@@ -3,7 +3,7 @@ package persistence
import (
"github.com/Masterminds/squirrel"
"github.com/deluan/rest"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/persistence/sql_search_test.go b/persistence/sql_search_test.go
index 60d4df755..b96c06f21 100644
--- a/persistence/sql_search_test.go
+++ b/persistence/sql_search_test.go
@@ -1,7 +1,7 @@
package persistence
import (
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/persistence/user_repository_test.go b/persistence/user_repository_test.go
index 6792bde38..8baeff577 100644
--- a/persistence/user_repository_test.go
+++ b/persistence/user_repository_test.go
@@ -9,7 +9,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/scanner/mapping_test.go b/scanner/mapping_test.go
index 02279b76e..f2281c1be 100644
--- a/scanner/mapping_test.go
+++ b/scanner/mapping_test.go
@@ -6,7 +6,7 @@ import (
"github.com/navidrome/navidrome/conf"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/scanner/metadata/ffmpeg/ffmpeg_suite_test.go b/scanner/metadata/ffmpeg/ffmpeg_suite_test.go
index 239c86f48..28f9440d7 100644
--- a/scanner/metadata/ffmpeg/ffmpeg_suite_test.go
+++ b/scanner/metadata/ffmpeg/ffmpeg_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/scanner/metadata/ffmpeg/ffmpeg_test.go b/scanner/metadata/ffmpeg/ffmpeg_test.go
index 32fb217cf..af5852735 100644
--- a/scanner/metadata/ffmpeg/ffmpeg_test.go
+++ b/scanner/metadata/ffmpeg/ffmpeg_test.go
@@ -1,7 +1,7 @@
package ffmpeg
import (
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/scanner/metadata/metadata_suite_test.go b/scanner/metadata/metadata_suite_test.go
index 25ed29dc1..dc2585dd1 100644
--- a/scanner/metadata/metadata_suite_test.go
+++ b/scanner/metadata/metadata_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/scanner/metadata/metadata_test.go b/scanner/metadata/metadata_test.go
index 038b957a4..de6dd4d18 100644
--- a/scanner/metadata/metadata_test.go
+++ b/scanner/metadata/metadata_test.go
@@ -2,7 +2,7 @@ package metadata
import (
"github.com/navidrome/navidrome/conf"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/scanner/metadata/taglib/taglib_suite_test.go b/scanner/metadata/taglib/taglib_suite_test.go
index c825817fa..31578b937 100644
--- a/scanner/metadata/taglib/taglib_suite_test.go
+++ b/scanner/metadata/taglib/taglib_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/scanner/metadata/taglib/taglib_test.go b/scanner/metadata/taglib/taglib_test.go
index bd71819ba..9de0e3bac 100644
--- a/scanner/metadata/taglib/taglib_test.go
+++ b/scanner/metadata/taglib/taglib_test.go
@@ -1,7 +1,7 @@
package taglib
import (
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/scanner/playlist_importer_test.go b/scanner/playlist_importer_test.go
index 6ae7c4f0c..01cff0cce 100644
--- a/scanner/playlist_importer_test.go
+++ b/scanner/playlist_importer_test.go
@@ -9,7 +9,7 @@ import (
"github.com/navidrome/navidrome/consts"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/scanner/scanner_suite_test.go b/scanner/scanner_suite_test.go
index 1ff087070..5640bb927 100644
--- a/scanner/scanner_suite_test.go
+++ b/scanner/scanner_suite_test.go
@@ -8,7 +8,7 @@ import (
"github.com/navidrome/navidrome/db"
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/scanner/tag_scanner_test.go b/scanner/tag_scanner_test.go
index 0a8edea5e..03cfb23e0 100644
--- a/scanner/tag_scanner_test.go
+++ b/scanner/tag_scanner_test.go
@@ -1,7 +1,7 @@
package scanner
import (
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/scanner/walk_dir_tree_test.go b/scanner/walk_dir_tree_test.go
index 95a586aaa..5b0079e7a 100644
--- a/scanner/walk_dir_tree_test.go
+++ b/scanner/walk_dir_tree_test.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"testing/fstest"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gstruct"
)
diff --git a/server/auth_test.go b/server/auth_test.go
index 566b0476a..3709f70d1 100644
--- a/server/auth_test.go
+++ b/server/auth_test.go
@@ -15,7 +15,7 @@ import (
"github.com/navidrome/navidrome/core/auth"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/events/diode_test.go b/server/events/diode_test.go
index ad9f2275e..50e3dd1a2 100644
--- a/server/events/diode_test.go
+++ b/server/events/diode_test.go
@@ -4,7 +4,7 @@ import (
"context"
"code.cloudfoundry.org/go-diodes"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/events/events_suite_test.go b/server/events/events_suite_test.go
index 8487745a6..b3462f27a 100644
--- a/server/events/events_suite_test.go
+++ b/server/events/events_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/events/events_test.go b/server/events/events_test.go
index 38a13ae48..abfab9b6e 100644
--- a/server/events/events_test.go
+++ b/server/events/events_test.go
@@ -1,7 +1,7 @@
package events
import (
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/events/sse_test.go b/server/events/sse_test.go
index 0650a5d5e..e6a44ca15 100644
--- a/server/events/sse_test.go
+++ b/server/events/sse_test.go
@@ -4,7 +4,7 @@ import (
"context"
"github.com/navidrome/navidrome/model/request"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/initial_setup_test.go b/server/initial_setup_test.go
index ce52c2165..982046f78 100644
--- a/server/initial_setup_test.go
+++ b/server/initial_setup_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/middlewares_test.go b/server/middlewares_test.go
index fa3fb21e5..a1ea59dce 100644
--- a/server/middlewares_test.go
+++ b/server/middlewares_test.go
@@ -5,7 +5,7 @@ import (
"net/http/httptest"
"os"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/nativeapi/native_api_suite_test.go b/server/nativeapi/native_api_suite_test.go
index d06af718f..2f6cb018c 100644
--- a/server/nativeapi/native_api_suite_test.go
+++ b/server/nativeapi/native_api_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/nativeapi/translations_test.go b/server/nativeapi/translations_test.go
index bc3b756b9..c49c26c67 100644
--- a/server/nativeapi/translations_test.go
+++ b/server/nativeapi/translations_test.go
@@ -9,7 +9,7 @@ import (
"github.com/navidrome/navidrome/consts"
"github.com/navidrome/navidrome/resources"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/serve_index_test.go b/server/serve_index_test.go
index 00bd88eaa..ab88b71d9 100644
--- a/server/serve_index_test.go
+++ b/server/serve_index_test.go
@@ -13,7 +13,7 @@ import (
"github.com/navidrome/navidrome/consts"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/server_suite_test.go b/server/server_suite_test.go
index 9677e3961..8739c240d 100644
--- a/server/server_suite_test.go
+++ b/server/server_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/subsonic/album_lists_test.go b/server/subsonic/album_lists_test.go
index 0ae1d69fb..8266d9307 100644
--- a/server/subsonic/album_lists_test.go
+++ b/server/subsonic/album_lists_test.go
@@ -9,7 +9,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/subsonic/api_suite_test.go b/server/subsonic/api_suite_test.go
index 1f7d07777..f4e8a3115 100644
--- a/server/subsonic/api_suite_test.go
+++ b/server/subsonic/api_suite_test.go
@@ -4,7 +4,7 @@ import (
"testing"
"github.com/navidrome/navidrome/log"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/subsonic/media_annotation_test.go b/server/subsonic/media_annotation_test.go
index ea7fc723e..7fd790dad 100644
--- a/server/subsonic/media_annotation_test.go
+++ b/server/subsonic/media_annotation_test.go
@@ -14,7 +14,7 @@ import (
"github.com/navidrome/navidrome/server/events"
"github.com/navidrome/navidrome/tests"
"github.com/navidrome/navidrome/utils"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/subsonic/media_retrieval_test.go b/server/subsonic/media_retrieval_test.go
index b98075991..e85961ece 100644
--- a/server/subsonic/media_retrieval_test.go
+++ b/server/subsonic/media_retrieval_test.go
@@ -10,7 +10,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/subsonic/middlewares_test.go b/server/subsonic/middlewares_test.go
index 5b6ef0d62..5ef7d1b07 100644
--- a/server/subsonic/middlewares_test.go
+++ b/server/subsonic/middlewares_test.go
@@ -16,7 +16,7 @@ import (
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/model/request"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/server/subsonic/responses/responses_suite_test.go b/server/subsonic/responses/responses_suite_test.go
index bf1ff1e45..365316c0d 100644
--- a/server/subsonic/responses/responses_suite_test.go
+++ b/server/subsonic/responses/responses_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/bradleyjkemp/cupaloy"
"github.com/navidrome/navidrome/log"
- "github.com/onsi/ginkgo"
+ "github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
"github.com/onsi/gomega/types"
)
@@ -26,7 +26,7 @@ type snapshotMatcher struct {
}
func (matcher snapshotMatcher) Match(actual interface{}) (success bool, err error) {
- err = matcher.c.SnapshotMulti(ginkgo.CurrentGinkgoTestDescription().FullTestText, actual)
+ err = matcher.c.SnapshotMulti(ginkgo.CurrentSpecReport().FullText(), actual)
success = err == nil
return
}
diff --git a/server/subsonic/responses/responses_test.go b/server/subsonic/responses/responses_test.go
index c442ad93c..bbdc91660 100644
--- a/server/subsonic/responses/responses_test.go
+++ b/server/subsonic/responses/responses_test.go
@@ -13,7 +13,7 @@ import (
"github.com/navidrome/navidrome/consts"
. "github.com/navidrome/navidrome/server/subsonic/responses"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/tools.go b/tools.go
index b4305c0eb..45806ea21 100644
--- a/tools.go
+++ b/tools.go
@@ -7,7 +7,7 @@ import (
_ "github.com/cespare/reflex"
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
_ "github.com/google/wire/cmd/wire"
- _ "github.com/onsi/ginkgo/ginkgo"
+ _ "github.com/onsi/ginkgo/v2/ginkgo"
_ "github.com/pressly/goose/cmd/goose"
_ "golang.org/x/tools/cmd/goimports"
)
diff --git a/utils/atomic_test.go b/utils/atomic_test.go
index cf11ed5cd..ab3f0959a 100644
--- a/utils/atomic_test.go
+++ b/utils/atomic_test.go
@@ -2,7 +2,7 @@ package utils_test
import (
"github.com/navidrome/navidrome/utils"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/cache/cache_suite_test.go b/utils/cache/cache_suite_test.go
index b669ce83b..7246008bb 100644
--- a/utils/cache/cache_suite_test.go
+++ b/utils/cache/cache_suite_test.go
@@ -5,7 +5,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/cache/file_caches_test.go b/utils/cache/file_caches_test.go
index de3691231..788dbf438 100644
--- a/utils/cache/file_caches_test.go
+++ b/utils/cache/file_caches_test.go
@@ -8,7 +8,7 @@ import (
"strings"
"github.com/navidrome/navidrome/conf"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/cache/spread_fs_test.go b/utils/cache/spread_fs_test.go
index f635eea89..2768ea2d5 100644
--- a/utils/cache/spread_fs_test.go
+++ b/utils/cache/spread_fs_test.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"strings"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/cached_http_client_test.go b/utils/cached_http_client_test.go
index e927e4ff3..0d00b120a 100644
--- a/utils/cached_http_client_test.go
+++ b/utils/cached_http_client_test.go
@@ -8,7 +8,7 @@ import (
"time"
"github.com/navidrome/navidrome/consts"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/context_test.go b/utils/context_test.go
index be9b5eba9..b2a7617e8 100644
--- a/utils/context_test.go
+++ b/utils/context_test.go
@@ -4,7 +4,7 @@ import (
"context"
"github.com/navidrome/navidrome/utils"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/encrypt_test.go b/utils/encrypt_test.go
index 4615302aa..5cd0a8c71 100644
--- a/utils/encrypt_test.go
+++ b/utils/encrypt_test.go
@@ -4,7 +4,7 @@ import (
"context"
"crypto/sha256"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/files_test.go b/utils/files_test.go
index cc237ce5b..917960c8c 100644
--- a/utils/files_test.go
+++ b/utils/files_test.go
@@ -3,7 +3,7 @@ package utils
import (
"path/filepath"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/gravatar/gravatar_test.go b/utils/gravatar/gravatar_test.go
index 373ce25cc..75c0b840e 100644
--- a/utils/gravatar/gravatar_test.go
+++ b/utils/gravatar/gravatar_test.go
@@ -6,7 +6,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
"github.com/navidrome/navidrome/utils/gravatar"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/index_group_parser_test.go b/utils/index_group_parser_test.go
index 47fb804e1..8bed12d89 100644
--- a/utils/index_group_parser_test.go
+++ b/utils/index_group_parser_test.go
@@ -1,7 +1,7 @@
package utils
import (
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/ints_test.go b/utils/ints_test.go
index 536cbbb9f..7f1ebe13f 100644
--- a/utils/ints_test.go
+++ b/utils/ints_test.go
@@ -1,7 +1,7 @@
package utils
import (
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/merge_fs_test.go b/utils/merge_fs_test.go
index a02aeba47..8789ff5bd 100644
--- a/utils/merge_fs_test.go
+++ b/utils/merge_fs_test.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"github.com/navidrome/navidrome/utils"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/pool/pool_test.go b/utils/pool/pool_test.go
index 73932ef1e..f8d723f5d 100644
--- a/utils/pool/pool_test.go
+++ b/utils/pool/pool_test.go
@@ -6,7 +6,7 @@ import (
"github.com/navidrome/navidrome/log"
"github.com/navidrome/navidrome/tests"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/request_helpers_test.go b/utils/request_helpers_test.go
index ffd964ce7..6956a286d 100644
--- a/utils/request_helpers_test.go
+++ b/utils/request_helpers_test.go
@@ -6,7 +6,7 @@ import (
"net/http/httptest"
"time"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/sanitize_strings_test.go b/utils/sanitize_strings_test.go
index daddc0753..393111fc5 100644
--- a/utils/sanitize_strings_test.go
+++ b/utils/sanitize_strings_test.go
@@ -1,7 +1,7 @@
package utils
import (
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/singleton/singleton_test.go b/utils/singleton/singleton_test.go
index d81616767..9014e4ef7 100644
--- a/utils/singleton/singleton_test.go
+++ b/utils/singleton/singleton_test.go
@@ -8,7 +8,7 @@ import (
"github.com/google/uuid"
"github.com/navidrome/navidrome/utils/singleton"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/strings_test.go b/utils/strings_test.go
index d85283136..20a59e166 100644
--- a/utils/strings_test.go
+++ b/utils/strings_test.go
@@ -2,7 +2,7 @@ package utils
import (
"github.com/navidrome/navidrome/conf"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/time_test.go b/utils/time_test.go
index 802690087..1f7e01970 100644
--- a/utils/time_test.go
+++ b/utils/time_test.go
@@ -3,7 +3,7 @@ package utils
import (
"time"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/utils_suite_test.go b/utils/utils_suite_test.go
index a88d17d83..847bc9652 100644
--- a/utils/utils_suite_test.go
+++ b/utils/utils_suite_test.go
@@ -3,7 +3,7 @@ package utils
import (
"testing"
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
diff --git a/utils/weighted_random_chooser_test.go b/utils/weighted_random_chooser_test.go
index 0d96daf42..5dae561c8 100644
--- a/utils/weighted_random_chooser_test.go
+++ b/utils/weighted_random_chooser_test.go
@@ -1,7 +1,7 @@
package utils
import (
- . "github.com/onsi/ginkgo"
+ . "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)