Skip to content

Commit ede3293

Browse files
committed
Correctly configure the backends path
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 596fdf5 commit ede3293

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

core/http/app_test.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ var _ = Describe("API test", func() {
295295
tmpdir, err = os.MkdirTemp("", "")
296296
Expect(err).ToNot(HaveOccurred())
297297

298+
backendPath := os.Getenv("BACKENDS_PATH")
299+
298300
modelDir = filepath.Join(tmpdir, "models")
299301
err = os.Mkdir(modelDir, 0750)
300302
Expect(err).ToNot(HaveOccurred())
@@ -337,7 +339,7 @@ var _ = Describe("API test", func() {
337339
config.WithContext(c),
338340
config.WithGalleries(galleries),
339341
config.WithModelPath(modelDir),
340-
config.WithBackendsPath(backendAssetsDir),
342+
config.WithBackendsPath(backendPath),
341343
config.WithApiKeys([]string{apiKey}),
342344
config.WithBackendAssets(backendAssets),
343345
config.WithBackendAssetsOutput(backendAssetsDir))...)
@@ -518,6 +520,9 @@ var _ = Describe("API test", func() {
518520
BeforeEach(func() {
519521
var err error
520522
tmpdir, err = os.MkdirTemp("", "")
523+
524+
backendPath := os.Getenv("BACKENDS_PATH")
525+
521526
Expect(err).ToNot(HaveOccurred())
522527
modelDir = filepath.Join(tmpdir, "models")
523528
backendAssetsDir := filepath.Join(tmpdir, "backend-assets")
@@ -541,7 +546,7 @@ var _ = Describe("API test", func() {
541546
append(commonOpts,
542547
config.WithContext(c),
543548
config.WithGeneratedContentDir(tmpdir),
544-
config.WithBackendsPath(backendAssetsDir),
549+
config.WithBackendsPath(backendPath),
545550
config.WithGalleries(galleries),
546551
config.WithModelPath(modelDir),
547552
config.WithBackendAssets(backendAssets),

0 commit comments

Comments
 (0)