diff --git a/internal/query/albums_test.go b/internal/query/albums_test.go index f176f1896..245bd076f 100644 --- a/internal/query/albums_test.go +++ b/internal/query/albums_test.go @@ -34,7 +34,7 @@ func TestAlbumCoverByUID(t *testing.T) { t.Fatal(err) } - assert.Equal(t, "exampleFileName.jpg", file.FileName) + assert.Equal(t, "2020/07/exampleFileName.jpg", file.FileName) }) t.Run("existing uid folder album", func(t *testing.T) { @@ -44,7 +44,7 @@ func TestAlbumCoverByUID(t *testing.T) { t.Fatal(err) } - assert.Equal(t, "bridge2.jpg", file.FileName) + assert.Equal(t, "London/bridge2.jpg", file.FileName) }) t.Run("existing uid empty moment album", func(t *testing.T) { diff --git a/internal/query/files_test.go b/internal/query/files_test.go index 221aca235..caa9f6c59 100644 --- a/internal/query/files_test.go +++ b/internal/query/files_test.go @@ -75,7 +75,7 @@ func TestFilesByUID(t *testing.T) { t.Fatal(err) } assert.Equal(t, 1, len(files)) - assert.Equal(t, "exampleFileName.jpg", files[0].FileName) + assert.Equal(t, "2020/07/exampleFileName.jpg", files[0].FileName) }) t.Run("no files found", func(t *testing.T) { files, err := FilesByUID([]string{"ft8es39w45bnlxxx"}, 100, 0) @@ -100,7 +100,7 @@ func TestFileByPhotoUID(t *testing.T) { if err != nil { t.Fatal(err) } - assert.Equal(t, "bridge.jpg", file.FileName) + assert.Equal(t, "London/bridge.jpg", file.FileName) }) t.Run("no files found", func(t *testing.T) { @@ -118,7 +118,7 @@ func TestVideoByPhotoUID(t *testing.T) { if err != nil { t.Fatal(err) } - assert.Equal(t, "bridge.mp4", file.FileName) + assert.Equal(t, "London/bridge2.mp4", file.FileName) }) t.Run("no files found", func(t *testing.T) { @@ -137,7 +137,7 @@ func TestFileByUID(t *testing.T) { t.Fatal(err) } - assert.Equal(t, "exampleFileName.jpg", file.FileName) + assert.Equal(t, "2020/07/exampleFileName.jpg", file.FileName) }) t.Run("no files found", func(t *testing.T) { @@ -159,7 +159,7 @@ func TestFileByHash(t *testing.T) { if err != nil { t.Fatal(err) } - assert.Equal(t, "exampleFileName.jpg", file.FileName) + assert.Equal(t, "2020/07/exampleFileName.jpg", file.FileName) }) t.Run("no files found", func(t *testing.T) { @@ -248,7 +248,7 @@ func TestRenameFile(t *testing.T) { } }) t.Run("success", func(t *testing.T) { - assert.Equal(t, "exampleXmpFile.xmp", entity.FileFixturesExampleXMP.FileName) + assert.Equal(t, "2020/07/exampleXmpFile.xmp", entity.FileFixturesExampleXMP.FileName) assert.Equal(t, "/", entity.FileFixturesExampleXMP.FileRoot) err := RenameFile("/", "exampleXmpFile.xmp", "test-root", "yyy.jpg") diff --git a/internal/query/label_test.go b/internal/query/label_test.go index d88d90519..15318a0f4 100644 --- a/internal/query/label_test.go +++ b/internal/query/label_test.go @@ -52,7 +52,7 @@ func TestLabelThumbBySlug(t *testing.T) { t.Fatal(err) } - assert.Equal(t, "bridge2.jpg", file.FileName) + assert.Equal(t, "London/bridge2.jpg", file.FileName) }) t.Run("no file found", func(t *testing.T) { @@ -72,7 +72,7 @@ func TestLabelThumbByUID(t *testing.T) { t.Fatal(err) } - assert.Equal(t, "bridge2.jpg", file.FileName) + assert.Equal(t, "London/bridge2.jpg", file.FileName) }) t.Run("no file found", func(t *testing.T) { diff --git a/internal/query/photo_search_test.go b/internal/query/photo_search_test.go index 62a69b1fe..a6bd9659b 100644 --- a/internal/query/photo_search_test.go +++ b/internal/query/photo_search_test.go @@ -693,7 +693,7 @@ func TestPhotoSearch(t *testing.T) { frm.Count = 10 frm.Offset = 0 frm.Name = "xxx|PhotoWithEditedAt" - frm.Filename = "xxx|Photo25.jpg" + frm.Filename = "xxx|test/Photo25.jpg" frm.Original = "xxx|OriginalPhotoWithEditedAt" frm.Title = "xxx|photowitheditedatdate" frm.Hash = "xxx|pcad9a68fa6acc5c5ba965adf6ec465ca42fd887"