Fix faces not getting scanned

- This fixes #344
- Add integration tests for face recognition
- Properly check that the user own the queried album
This commit is contained in:
viktorstrate
2021-04-26 12:21:15 +02:00
parent d03923992c
commit 1029b61a4c
14 changed files with 126 additions and 92 deletions

View File

@@ -32,11 +32,12 @@ func UnitTestRun(m *testing.M) int {
func IntegrationTestRun(m *testing.M) int {
flag.Parse()
_, file, _, ok := runtime.Caller(0)
if !ok {
log.Fatal("could not get runtime file path")
}
if *integration_flags.Database {
_, file, _, ok := runtime.Caller(0)
if !ok {
log.Fatal("could not get runtime file path")
}
envPath := path.Join(path.Dir(file), "..", "testing.env")
@@ -45,6 +46,9 @@ func IntegrationTestRun(m *testing.M) int {
}
}
faceModelsPath := path.Join(path.Dir(file), "..", "data", "models")
utils.ConfigureTestFaceRecognitionModelsPath(faceModelsPath)
result := m.Run()
test_dbm.Close()