Files
photoview/api/test_utils/env_test.go
Googol Lee a378522af4 Use magick generating thumbnails.
Fix #1204

* Add bad medias to scanner_test.

* Fix the script.

* Add GenerateThumbnail function.

* Add identify dimension

* Use new API. Cover json condition.

* Use magick to generate thumbnails.

* Update go mod.

* Remove dependency of executable_worker -> test_utils

* Reduce dependency of magick.

* Use magick to get dimension.

* Remove almost all code around `image` package.

* Fix thumbnailing with multi-frame gif.

* Remove the struct in wrapper.

* Fix typo.

* Build images.

* Update logs

* Add jpeg decoder.

* Remove code dependency.

* Add log to confirm scan in parallel.

* Update log

* Add reformat image perf tests.

* Rollback the build workflow.
2025-05-22 09:01:43 +02:00

13 lines
279 B
Go

package test_utils
import (
"strings"
"testing"
)
func TestPathFromAPIRoot(t *testing.T) {
if got, want := PathFromAPIRoot("./server.go"), "/api/server.go"; !strings.HasSuffix(got, want) {
t.Fatalf(`PathFromAPIRoot("./server.go") = %q, want a suffix: %q`, got, want)
}
}