mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Purge: Improve tests and logs for RegenerateIndex() #2540
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -14,6 +14,15 @@ import (
|
||||
)
|
||||
|
||||
func TestFile_RegenerateIndex(t *testing.T) {
|
||||
t.Run("ID", func(t *testing.T) {
|
||||
File{ID: 1000000}.RegenerateIndex()
|
||||
})
|
||||
t.Run("PhotoID", func(t *testing.T) {
|
||||
File{PhotoID: 1000039}.RegenerateIndex()
|
||||
})
|
||||
t.Run("PhotoUID", func(t *testing.T) {
|
||||
File{PhotoUID: "pr2xu7myk7wrbk32"}.RegenerateIndex()
|
||||
})
|
||||
t.Run("FirstFileByHash", func(t *testing.T) {
|
||||
f, err := FirstFileByHash("2cad9168fa6acc5c5c2965ddf6ec465ca42fd818")
|
||||
if err != nil {
|
||||
@@ -21,6 +30,9 @@ func TestFile_RegenerateIndex(t *testing.T) {
|
||||
}
|
||||
f.RegenerateIndex()
|
||||
})
|
||||
t.Run("All", func(t *testing.T) {
|
||||
File{}.RegenerateIndex()
|
||||
})
|
||||
}
|
||||
|
||||
func TestFirstFileByHash(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user