feat: rebuild pet app and backend around core care flows

This commit is contained in:
2026-10-01 13:11:30 +08:00
parent 51ead8f411
commit bfcf8788a4
321 changed files with 4918 additions and 25199 deletions
+21
View File
@@ -0,0 +1,21 @@
package storage
import (
"testing"
"github.com/sundynix/pets-be/internal/config"
)
func TestPublicURLUsesEndpoint(t *testing.T) {
store, err := New(config.MinIOConfig{
Endpoint: "https://s3.sundynix.cn", AccessKey: "test", SecretKey: "test", Bucket: "sundynix-pet",
})
if err != nil {
t.Fatal(err)
}
got := store.PublicURL("files/2026-10-01/corgi photo.png")
want := "https://s3.sundynix.cn/sundynix-pet/files/2026-10-01/corgi%20photo.png"
if got != want {
t.Fatalf("PublicURL() = %q, want %q", got, want)
}
}