Add test for indexAll function

This commit is contained in:
Theresa Gresch 2019-07-09 14:30:08 +02:00
parent 775a48727b
commit 92e03b2069

View 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()
}