diff --git a/go.mod b/go.mod index e4ed32817..ee855888d 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/Masterminds/squirrel v1.5.3 github.com/ReneKroon/ttlcache/v2 v2.11.0 github.com/beego/beego/v2 v2.0.6 - github.com/bradleyjkemp/cupaloy v2.3.0+incompatible + github.com/bradleyjkemp/cupaloy/v2 v2.8.0 github.com/cespare/reflex v0.3.1 github.com/deluan/rest v0.0.0-20211101235434-380523c4bb47 github.com/dhowden/tag v0.0.0-20220618230019-adf36e896086 diff --git a/go.sum b/go.sum index 80a40184c..579e82b39 100644 --- a/go.sum +++ b/go.sum @@ -95,8 +95,8 @@ github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= github.com/bombsimon/wsl/v3 v3.3.0 h1:Mka/+kRLoQJq7g2rggtgQsjuI/K5Efd87WX96EWFxjM= github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= -github.com/bradleyjkemp/cupaloy v2.3.0+incompatible h1:UafIjBvWQmS9i/xRg+CamMrnLTKNzo+bdmT/oH34c2Y= -github.com/bradleyjkemp/cupaloy v2.3.0+incompatible/go.mod h1:Au1Xw1sgaJ5iSFktEhYsS0dbQiS1B0/XMXl+42y9Ilk= +github.com/bradleyjkemp/cupaloy/v2 v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oMMlVBbn9M= +github.com/bradleyjkemp/cupaloy/v2 v2.8.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= github.com/breml/bidichk v0.2.3 h1:qe6ggxpTfA8E75hdjWPZ581sY3a2lnl0IRxLQFelECI= github.com/breml/bidichk v0.2.3/go.mod h1:8u2C6DnAy0g2cEq+k/A2+tr9O1s+vHGxWn0LTc70T2A= github.com/breml/errchkjson v0.3.0 h1:YdDqhfqMT+I1vIxPSas44P+9Z9HzJwCeAzjB8PxP1xw= diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList with data should match .JSON b/server/subsonic/responses/.snapshots/Responses AlbumList with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses AlbumList with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList with data should match .XML b/server/subsonic/responses/.snapshots/Responses AlbumList with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList with data should match .XML rename to server/subsonic/responses/.snapshots/Responses AlbumList with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList without data should match .JSON b/server/subsonic/responses/.snapshots/Responses AlbumList without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses AlbumList without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList without data should match .XML b/server/subsonic/responses/.snapshots/Responses AlbumList without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses AlbumList without data should match .XML rename to server/subsonic/responses/.snapshots/Responses AlbumList without data should match .XML diff --git a/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .JSON b/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .JSON new file mode 100644 index 000000000..4d4c99f5f --- /dev/null +++ b/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .JSON @@ -0,0 +1 @@ +{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","artistInfo":{"biography":"Black Sabbath is an English \u003ca target='_blank' href=\"http://www.last.fm/tag/heavy%20metal\" class=\"bbcode_tag\" rel=\"tag\"\u003eheavy metal\u003c/a\u003e band","musicBrainzId":"5182c1d9-c7d2-4dad-afa0-ccfeada921a8","lastFmUrl":"https://www.last.fm/music/Black+Sabbath","smallImageUrl":"https://userserve-ak.last.fm/serve/64/27904353.jpg","mediumImageUrl":"https://userserve-ak.last.fm/serve/126/27904353.jpg","largeImageUrl":"https://userserve-ak.last.fm/serve/_/27904353/Black+Sabbath+sabbath+1970.jpg","similarArtist":[{"id":"22","name":"Accept"},{"id":"101","name":"Bruce Dickinson"},{"id":"26","name":"Aerosmith"}]}} diff --git a/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .XML b/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .XML new file mode 100644 index 000000000..a3cc029b6 --- /dev/null +++ b/server/subsonic/responses/.snapshots/Responses ArtistInfo with data should match .XML @@ -0,0 +1 @@ +Black Sabbath is an English <a target='_blank' href="http://www.last.fm/tag/heavy%20metal" class="bbcode_tag" rel="tag">heavy metal</a> band5182c1d9-c7d2-4dad-afa0-ccfeada921a8https://www.last.fm/music/Black+Sabbathhttps://userserve-ak.last.fm/serve/64/27904353.jpghttps://userserve-ak.last.fm/serve/126/27904353.jpghttps://userserve-ak.last.fm/serve/_/27904353/Black+Sabbath+sabbath+1970.jpg diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ArtistInfo without data should match .JSON b/server/subsonic/responses/.snapshots/Responses ArtistInfo without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ArtistInfo without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses ArtistInfo without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ArtistInfo without data should match .XML b/server/subsonic/responses/.snapshots/Responses ArtistInfo without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ArtistInfo without data should match .XML rename to server/subsonic/responses/.snapshots/Responses ArtistInfo without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Bookmarks with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Bookmarks with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Bookmarks with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Bookmarks with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Bookmarks with data should match .XML b/server/subsonic/responses/.snapshots/Responses Bookmarks with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Bookmarks with data should match .XML rename to server/subsonic/responses/.snapshots/Responses Bookmarks with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Bookmarks without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Bookmarks without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Bookmarks without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Bookmarks without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Bookmarks without data should match .XML b/server/subsonic/responses/.snapshots/Responses Bookmarks without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Bookmarks without data should match .XML rename to server/subsonic/responses/.snapshots/Responses Bookmarks without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Child with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Child with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Child with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Child with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Child with data should match .XML b/server/subsonic/responses/.snapshots/Responses Child with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Child with data should match .XML rename to server/subsonic/responses/.snapshots/Responses Child with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Directory with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Directory with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory with data should match .XML b/server/subsonic/responses/.snapshots/Responses Directory with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory with data should match .XML rename to server/subsonic/responses/.snapshots/Responses Directory with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Directory without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Directory without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory without data should match .XML b/server/subsonic/responses/.snapshots/Responses Directory without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Directory without data should match .XML rename to server/subsonic/responses/.snapshots/Responses Directory without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses EmptyResponse should match .JSON b/server/subsonic/responses/.snapshots/Responses EmptyResponse should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses EmptyResponse should match .JSON rename to server/subsonic/responses/.snapshots/Responses EmptyResponse should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses EmptyResponse should match .XML b/server/subsonic/responses/.snapshots/Responses EmptyResponse should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses EmptyResponse should match .XML rename to server/subsonic/responses/.snapshots/Responses EmptyResponse should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Genres with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Genres with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres with data should match .XML b/server/subsonic/responses/.snapshots/Responses Genres with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres with data should match .XML rename to server/subsonic/responses/.snapshots/Responses Genres with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Genres without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Genres without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres without data should match .XML b/server/subsonic/responses/.snapshots/Responses Genres without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Genres without data should match .XML rename to server/subsonic/responses/.snapshots/Responses Genres without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Indexes with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Indexes with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes with data should match .XML b/server/subsonic/responses/.snapshots/Responses Indexes with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes with data should match .XML rename to server/subsonic/responses/.snapshots/Responses Indexes with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Indexes without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Indexes without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes without data should match .XML b/server/subsonic/responses/.snapshots/Responses Indexes without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Indexes without data should match .XML rename to server/subsonic/responses/.snapshots/Responses Indexes without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses License should match .JSON b/server/subsonic/responses/.snapshots/Responses License should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses License should match .JSON rename to server/subsonic/responses/.snapshots/Responses License should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses License should match .XML b/server/subsonic/responses/.snapshots/Responses License should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses License should match .XML rename to server/subsonic/responses/.snapshots/Responses License should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Lyrics with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Lyrics with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Lyrics with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Lyrics with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Lyrics with data should match .XML b/server/subsonic/responses/.snapshots/Responses Lyrics with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Lyrics with data should match .XML rename to server/subsonic/responses/.snapshots/Responses Lyrics with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Lyrics without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Lyrics without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Lyrics without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Lyrics without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Lyrics without data should match .XML b/server/subsonic/responses/.snapshots/Responses Lyrics without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Lyrics without data should match .XML rename to server/subsonic/responses/.snapshots/Responses Lyrics without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders with data should match .JSON b/server/subsonic/responses/.snapshots/Responses MusicFolders with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses MusicFolders with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders with data should match .XML b/server/subsonic/responses/.snapshots/Responses MusicFolders with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders with data should match .XML rename to server/subsonic/responses/.snapshots/Responses MusicFolders with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders without data should match .JSON b/server/subsonic/responses/.snapshots/Responses MusicFolders without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses MusicFolders without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders without data should match .XML b/server/subsonic/responses/.snapshots/Responses MusicFolders without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses MusicFolders without data should match .XML rename to server/subsonic/responses/.snapshots/Responses MusicFolders without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses PlayQueue with data should match .JSON b/server/subsonic/responses/.snapshots/Responses PlayQueue with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses PlayQueue with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses PlayQueue with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses PlayQueue with data should match .XML b/server/subsonic/responses/.snapshots/Responses PlayQueue with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses PlayQueue with data should match .XML rename to server/subsonic/responses/.snapshots/Responses PlayQueue with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses PlayQueue without data should match .JSON b/server/subsonic/responses/.snapshots/Responses PlayQueue without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses PlayQueue without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses PlayQueue without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses PlayQueue without data should match .XML b/server/subsonic/responses/.snapshots/Responses PlayQueue without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses PlayQueue without data should match .XML rename to server/subsonic/responses/.snapshots/Responses PlayQueue without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Playlists with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Playlists with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .XML b/server/subsonic/responses/.snapshots/Responses Playlists with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists with data should match .XML rename to server/subsonic/responses/.snapshots/Responses Playlists with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Playlists without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Playlists without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists without data should match .XML b/server/subsonic/responses/.snapshots/Responses Playlists without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Playlists without data should match .XML rename to server/subsonic/responses/.snapshots/Responses Playlists without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ScanStatus with data should match .JSON b/server/subsonic/responses/.snapshots/Responses ScanStatus with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ScanStatus with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses ScanStatus with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ScanStatus with data should match .XML b/server/subsonic/responses/.snapshots/Responses ScanStatus with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ScanStatus with data should match .XML rename to server/subsonic/responses/.snapshots/Responses ScanStatus with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ScanStatus without data should match .JSON b/server/subsonic/responses/.snapshots/Responses ScanStatus without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ScanStatus without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses ScanStatus without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ScanStatus without data should match .XML b/server/subsonic/responses/.snapshots/Responses ScanStatus without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ScanStatus without data should match .XML rename to server/subsonic/responses/.snapshots/Responses ScanStatus without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs with data should match .JSON b/server/subsonic/responses/.snapshots/Responses SimilarSongs with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses SimilarSongs with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs with data should match .XML b/server/subsonic/responses/.snapshots/Responses SimilarSongs with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs with data should match .XML rename to server/subsonic/responses/.snapshots/Responses SimilarSongs with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs without data should match .JSON b/server/subsonic/responses/.snapshots/Responses SimilarSongs without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses SimilarSongs without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs without data should match .XML b/server/subsonic/responses/.snapshots/Responses SimilarSongs without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs without data should match .XML rename to server/subsonic/responses/.snapshots/Responses SimilarSongs without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs2 with data should match .JSON b/server/subsonic/responses/.snapshots/Responses SimilarSongs2 with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs2 with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses SimilarSongs2 with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs2 with data should match .XML b/server/subsonic/responses/.snapshots/Responses SimilarSongs2 with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs2 with data should match .XML rename to server/subsonic/responses/.snapshots/Responses SimilarSongs2 with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs2 without data should match .JSON b/server/subsonic/responses/.snapshots/Responses SimilarSongs2 without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs2 without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses SimilarSongs2 without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs2 without data should match .XML b/server/subsonic/responses/.snapshots/Responses SimilarSongs2 without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses SimilarSongs2 without data should match .XML rename to server/subsonic/responses/.snapshots/Responses SimilarSongs2 without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses TopSongs with data should match .JSON b/server/subsonic/responses/.snapshots/Responses TopSongs with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses TopSongs with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses TopSongs with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses TopSongs with data should match .XML b/server/subsonic/responses/.snapshots/Responses TopSongs with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses TopSongs with data should match .XML rename to server/subsonic/responses/.snapshots/Responses TopSongs with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses TopSongs without data should match .JSON b/server/subsonic/responses/.snapshots/Responses TopSongs without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses TopSongs without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses TopSongs without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses TopSongs without data should match .XML b/server/subsonic/responses/.snapshots/Responses TopSongs without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses TopSongs without data should match .XML rename to server/subsonic/responses/.snapshots/Responses TopSongs without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .JSON b/server/subsonic/responses/.snapshots/Responses User with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses User with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .XML b/server/subsonic/responses/.snapshots/Responses User with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .XML rename to server/subsonic/responses/.snapshots/Responses User with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User without data should match .JSON b/server/subsonic/responses/.snapshots/Responses User without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses User without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User without data should match .XML b/server/subsonic/responses/.snapshots/Responses User without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User without data should match .XML rename to server/subsonic/responses/.snapshots/Responses User without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Users with data should match .JSON b/server/subsonic/responses/.snapshots/Responses Users with data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Users with data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Users with data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Users with data should match .XML b/server/subsonic/responses/.snapshots/Responses Users with data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Users with data should match .XML rename to server/subsonic/responses/.snapshots/Responses Users with data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Users without data should match .JSON b/server/subsonic/responses/.snapshots/Responses Users without data should match .JSON similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Users without data should match .JSON rename to server/subsonic/responses/.snapshots/Responses Users without data should match .JSON diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Users without data should match .XML b/server/subsonic/responses/.snapshots/Responses Users without data should match .XML similarity index 100% rename from server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses Users without data should match .XML rename to server/subsonic/responses/.snapshots/Responses Users without data should match .XML diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ArtistInfo with data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ArtistInfo with data should match .JSON deleted file mode 100644 index 35d7071da..000000000 --- a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ArtistInfo with data should match .JSON +++ /dev/null @@ -1 +0,0 @@ -{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","artistInfo":{"biography":"Black Sabbath is an English \u003ca target='_blank' href=\"http://www.last.fm/tag/heavy%20metal\" class=\"bbcode_tag\" rel=\"tag\"\u003eheavy metal\u003c/a\u003e band","musicBrainzId":"5182c1d9-c7d2-4dad-afa0-ccfeada921a8","lastFmUrl":"http://www.last.fm/music/Black+Sabbath","smallImageUrl":"http://userserve-ak.last.fm/serve/64/27904353.jpg","mediumImageUrl":"http://userserve-ak.last.fm/serve/126/27904353.jpg","largeImageUrl":"http://userserve-ak.last.fm/serve/_/27904353/Black+Sabbath+sabbath+1970.jpg","similarArtist":[{"id":"22","name":"Accept"},{"id":"101","name":"Bruce Dickinson"},{"id":"26","name":"Aerosmith"}]}} diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ArtistInfo with data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ArtistInfo with data should match .XML deleted file mode 100644 index a1c26adbe..000000000 --- a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses ArtistInfo with data should match .XML +++ /dev/null @@ -1 +0,0 @@ -Black Sabbath is an English <a target='_blank' href="http://www.last.fm/tag/heavy%20metal" class="bbcode_tag" rel="tag">heavy metal</a> band5182c1d9-c7d2-4dad-afa0-ccfeada921a8http://www.last.fm/music/Black+Sabbathhttp://userserve-ak.last.fm/serve/64/27904353.jpghttp://userserve-ak.last.fm/serve/126/27904353.jpghttp://userserve-ak.last.fm/serve/_/27904353/Black+Sabbath+sabbath+1970.jpg diff --git a/server/subsonic/responses/responses_suite_test.go b/server/subsonic/responses/responses_suite_test.go index 365316c0d..8728b949a 100644 --- a/server/subsonic/responses/responses_suite_test.go +++ b/server/subsonic/responses/responses_suite_test.go @@ -1,9 +1,10 @@ package responses import ( + "strings" "testing" - "github.com/bradleyjkemp/cupaloy" + "github.com/bradleyjkemp/cupaloy/v2" "github.com/navidrome/navidrome/log" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" @@ -26,15 +27,16 @@ type snapshotMatcher struct { } func (matcher snapshotMatcher) Match(actual interface{}) (success bool, err error) { - err = matcher.c.SnapshotMulti(ginkgo.CurrentSpecReport().FullText(), actual) + actualJson := strings.TrimSpace(string(actual.([]byte))) + err = matcher.c.SnapshotWithName(ginkgo.CurrentSpecReport().FullText(), actualJson) success = err == nil return } -func (matcher snapshotMatcher) FailureMessage(actual interface{}) (message string) { +func (matcher snapshotMatcher) FailureMessage(_ interface{}) (message string) { return "Expected to match saved snapshot\n" } -func (matcher snapshotMatcher) NegatedFailureMessage(actual interface{}) (message string) { +func (matcher snapshotMatcher) NegatedFailureMessage(_ interface{}) (message string) { return "Expected to not match saved snapshot\n" } diff --git a/server/subsonic/responses/responses_test.go b/server/subsonic/responses/responses_test.go index b65491123..4a2715f23 100644 --- a/server/subsonic/responses/responses_test.go +++ b/server/subsonic/responses/responses_test.go @@ -352,10 +352,10 @@ var _ = Describe("Responses", func() { BeforeEach(func() { response.ArtistInfo.Biography = `Black Sabbath is an English band` response.ArtistInfo.MusicBrainzID = "5182c1d9-c7d2-4dad-afa0-ccfeada921a8" - response.ArtistInfo.LastFmUrl = "http://www.last.fm/music/Black+Sabbath" - response.ArtistInfo.SmallImageUrl = "http://userserve-ak.last.fm/serve/64/27904353.jpg" - response.ArtistInfo.MediumImageUrl = "http://userserve-ak.last.fm/serve/126/27904353.jpg" - response.ArtistInfo.LargeImageUrl = "http://userserve-ak.last.fm/serve/_/27904353/Black+Sabbath+sabbath+1970.jpg" + response.ArtistInfo.LastFmUrl = "https://www.last.fm/music/Black+Sabbath" + response.ArtistInfo.SmallImageUrl = "https://userserve-ak.last.fm/serve/64/27904353.jpg" + response.ArtistInfo.MediumImageUrl = "https://userserve-ak.last.fm/serve/126/27904353.jpg" + response.ArtistInfo.LargeImageUrl = "https://userserve-ak.last.fm/serve/_/27904353/Black+Sabbath+sabbath+1970.jpg" response.ArtistInfo.SimilarArtist = []Artist{ {Id: "22", Name: "Accept"}, {Id: "101", Name: "Bruce Dickinson"},