From 92e03b2069c54fb8233add3997999c76ec544bf5 Mon Sep 17 00:00:00 2001 From: Theresa Gresch Date: Tue, 9 Jul 2019 14:30:08 +0200 Subject: [PATCH] Add test for indexAll function --- internal/photoprism/indexer_test.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 internal/photoprism/indexer_test.go diff --git a/internal/photoprism/indexer_test.go b/internal/photoprism/indexer_test.go new file mode 100644 index 000000000..b05138ac0 --- /dev/null +++ b/internal/photoprism/indexer_test.go @@ -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() +}