Add test for indexAll function
This commit is contained in:
parent
775a48727b
commit
92e03b2069
1 changed files with 28 additions and 0 deletions
28
internal/photoprism/indexer_test.go
Normal file
28
internal/photoprism/indexer_test.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
package photoprism
|
||||
|
||||
import (
|
||||
"github.com/photoprism/photoprism/internal/config"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestIndexer_IndexAll(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping test in short mode.")
|
||||
}
|
||||
|
||||
conf := config.TestConfig()
|
||||
|
||||
conf.InitializeTestData(t)
|
||||
|
||||
tensorFlow := NewTensorFlow(conf)
|
||||
|
||||
indexer := NewIndexer(conf, tensorFlow)
|
||||
|
||||
converter := NewConverter(conf)
|
||||
|
||||
importer := NewImporter(conf, indexer, converter)
|
||||
|
||||
importer.ImportPhotosFromDirectory(conf.ImportPath())
|
||||
|
||||
indexer.IndexAll()
|
||||
}
|
Loading…
Reference in a new issue