Config: Fix assets path and disable hub updates when running unit tests

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-10-04 14:16:11 +02:00
parent 133afda8ce
commit b71ec5bce1
14 changed files with 339 additions and 71 deletions

View File

@@ -20,13 +20,6 @@ import (
"github.com/photoprism/photoprism/pkg/service/http/header"
)
// Ensure assets path is set so TestMain in this package can initialize config.
func init() {
if os.Getenv("PHOTOPRISM_ASSETS_PATH") == "" {
_ = os.Setenv("PHOTOPRISM_ASSETS_PATH", fs.Abs("../../assets"))
}
}
func TestMain(m *testing.M) {
// Init test logger.
log = logrus.StandardLogger()