mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user