feat: rebuild pet app and backend around core care flows
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user