Backend: Fix worker tests
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
6504c7ae74
commit
faba5c3195
2 changed files with 4 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
|||
package workers
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/photoprism/photoprism/internal/config"
|
||||
|
@ -30,10 +31,6 @@ func TestPrism_Start(t *testing.T) {
|
|||
if err := worker.Start(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if err := worker.Start(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMeta_originalsPath(t *testing.T) {
|
||||
|
@ -42,5 +39,5 @@ func TestMeta_originalsPath(t *testing.T) {
|
|||
worker := NewMeta(conf)
|
||||
|
||||
assert.IsType(t, &Meta{}, worker)
|
||||
assert.Equal(t, "/go/src/github.com/photoprism/photoprism/storage/testdata/originals", worker.originalsPath())
|
||||
assert.True(t, strings.HasSuffix(worker.originalsPath(), "testdata/originals"))
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package workers
|
|||
|
||||
import (
|
||||
"github.com/photoprism/photoprism/internal/entity"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/photoprism/photoprism/internal/config"
|
||||
|
@ -31,7 +32,7 @@ func TestSync_downloadPath(t *testing.T) {
|
|||
worker := NewSync(conf)
|
||||
|
||||
assert.IsType(t, &Sync{}, worker)
|
||||
assert.Equal(t, "/go/src/github.com/photoprism/photoprism/storage/testdata/temp/sync", worker.downloadPath())
|
||||
assert.True(t, strings.HasSuffix(worker.downloadPath(), "testdata/temp/sync"))
|
||||
}
|
||||
|
||||
func TestSync_relatedDownloads(t *testing.T) {
|
||||
|
|
Loading…
Reference in a new issue