Fixed unit tests

This commit is contained in:
emeric
2024-11-15 18:16:00 +01:00
parent 7b4791005a
commit 0a320a8b87
10 changed files with 45 additions and 36 deletions
+4 -4
View File
@@ -89,8 +89,8 @@ namespace lms::db::tests
ScopedArtist artist1{ session, "MyArtist1" };
ScopedArtist artist2{ session, "MyArtist2" };
ScopedArtist artist3{ session, "MyArtist3" };
ScopedMediaLibrary library{ session };
ScopedMediaLibrary otherLibrary{ session };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
ScopedMediaLibrary otherLibrary{ session, "OtherLibrary", "/otherRoot" };
{
auto transaction{ session.createWriteTransaction() };
@@ -306,8 +306,8 @@ namespace lms::db::tests
{
ScopedTrack track{ session };
ScopedArtist artist{ session, "MyArtist" };
ScopedMediaLibrary library{ session };
ScopedMediaLibrary otherLibrary{ session };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
ScopedMediaLibrary otherLibrary{ session, "OtherLibrary", "/otherRoot" };
{
auto transaction{ session.createWriteTransaction() };
+1 -1
View File
@@ -260,7 +260,7 @@ namespace lms::db::tests
ScopedDirectory parent2{ session, "/root_1" };
ScopedDirectory child2{ session, "/root_1/foo" };
ScopedMediaLibrary library{ session, "/root" };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
{
auto transaction{ session.createReadTransaction() };
+12 -12
View File
@@ -343,8 +343,8 @@ namespace lms::db::tests
ScopedUser user{ session, "MyUser" };
const Wt::WDateTime dateTime1{ Wt::WDate{ 2000, 1, 2 }, Wt::WTime{ 12, 0, 1 } };
ScopedListen listen{ session, user.lockAndGet(), track.lockAndGet(), ScrobblingBackend::Internal, dateTime1 };
ScopedMediaLibrary library{ session };
ScopedMediaLibrary otherLibrary{ session };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
ScopedMediaLibrary otherLibrary{ session, "OtherLibrary", "/otherRoot" };
{
auto transaction{ session.createReadTransaction() };
@@ -563,8 +563,8 @@ namespace lms::db::tests
ScopedUser user{ session, "MyUser" };
const Wt::WDateTime dateTime{ Wt::WDate{ 2000, 1, 2 }, Wt::WTime{ 12, 0, 1 } };
ScopedRelease release{ session, "MyRelease" };
ScopedMediaLibrary library{ session };
ScopedMediaLibrary otherLibrary{ session };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
ScopedMediaLibrary otherLibrary{ session, "OtherLibrary", "/otherRoot" };
{
auto transaction{ session.createWriteTransaction() };
@@ -809,8 +809,8 @@ namespace lms::db::tests
ScopedTrack track{ session };
ScopedUser user{ session, "MyUser" };
const Wt::WDateTime dateTime{ Wt::WDate{ 2000, 1, 2 }, Wt::WTime{ 12, 0, 1 } };
ScopedMediaLibrary library{ session };
ScopedMediaLibrary otherLibrary{ session };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
ScopedMediaLibrary otherLibrary{ session, "OtherLibrary", "/otherRoot" };
{
auto transaction{ session.createReadTransaction() };
@@ -1051,8 +1051,8 @@ namespace lms::db::tests
ScopedTrack track{ session };
ScopedUser user{ session, "MyUser" };
ScopedArtist artist{ session, "MyArtist" };
ScopedMediaLibrary library{ session };
ScopedMediaLibrary otherLibrary{ session };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
ScopedMediaLibrary otherLibrary{ session, "OtherLibrary", "/otherRoot" };
{
auto transaction{ session.createWriteTransaction() };
@@ -1325,8 +1325,8 @@ namespace lms::db::tests
ScopedTrack track{ session };
ScopedUser user{ session, "MyUser" };
ScopedRelease release{ session, "MyRelease" };
ScopedMediaLibrary library{ session };
ScopedMediaLibrary otherLibrary{ session };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
ScopedMediaLibrary otherLibrary{ session, "OtherLibrary", "/otherRoot" };
{
auto transaction{ session.createWriteTransaction() };
@@ -1410,8 +1410,8 @@ namespace lms::db::tests
{
ScopedTrack track{ session };
ScopedUser user{ session, "MyUser" };
ScopedMediaLibrary library{ session };
ScopedMediaLibrary otherLibrary{ session };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
ScopedMediaLibrary otherLibrary{ session, "OtherLibrary", "/otherRoot" };
const Wt::WDateTime dateTime{ Wt::WDate{ 2000, 1, 2 }, Wt::WTime{ 12, 0, 1 } };
ScopedListen listen1{ session, user.lockAndGet(), track.lockAndGet(), ScrobblingBackend::Internal, dateTime };
+4 -4
View File
@@ -86,8 +86,8 @@ namespace lms::db::tests
ScopedRelease release1{ session, "MyRelease1" };
ScopedRelease release2{ session, "MyRelease2" };
ScopedRelease release3{ session, "MyRelease3" };
ScopedMediaLibrary library{ session };
ScopedMediaLibrary otherLibrary{ session };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
ScopedMediaLibrary otherLibrary{ session, "OtherLibrary", "/otherRoot" };
{
auto transaction{ session.createWriteTransaction() };
@@ -233,8 +233,8 @@ namespace lms::db::tests
{
ScopedTrack track{ session };
ScopedRelease release{ session, "MyRelease" };
ScopedMediaLibrary library{ session };
ScopedMediaLibrary otherLibrary{ session };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
ScopedMediaLibrary otherLibrary{ session, "OtherLibrary", "/otherRoot" };
{
auto transaction{ session.createWriteTransaction() };
+4 -4
View File
@@ -67,8 +67,8 @@ namespace lms::db::tests
ScopedTrack track1{ session };
ScopedTrack track2{ session };
ScopedTrack track3{ session };
ScopedMediaLibrary library{ session };
ScopedMediaLibrary otherLibrary{ session };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
ScopedMediaLibrary otherLibrary{ session, "OtherLibrary", "/otherRoot" };
{
auto transaction{ session.createWriteTransaction() };
@@ -148,8 +148,8 @@ namespace lms::db::tests
TEST_F(DatabaseFixture, Track_MediaLibrary)
{
ScopedTrack track{ session };
ScopedMediaLibrary library{ session };
ScopedMediaLibrary otherLibrary{ session };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
ScopedMediaLibrary otherLibrary{ session, "OtherLibrary", "/otherRoot" };
{
auto transaction{ session.createWriteTransaction() };
+1 -1
View File
@@ -158,7 +158,7 @@ namespace lms::db::tests
ScopedTrackList trackList2{ session, "MytrackList2", TrackListType::Playlist, false, user.lockAndGet() };
ScopedTrack track1{ session };
ScopedTrack track2{ session };
ScopedMediaLibrary library{ session };
ScopedMediaLibrary library{ session, "MyLibrary", "/root" };
{
auto transaction{ session.createWriteTransaction() };