1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-12-02 09:31:58 +02:00

added basic s3blob tests

This commit is contained in:
Gani Georgiev
2025-03-08 22:28:51 +02:00
parent f799083c4f
commit ed36add853
13 changed files with 676 additions and 121 deletions

View File

@@ -7,17 +7,18 @@ import (
"testing"
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3"
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
)
func TestS3HeadObject(t *testing.T) {
t.Parallel()
httpClient := NewTestClient(
&RequestStub{
httpClient := tests.NewClient(
&tests.RequestStub{
Method: http.MethodHead,
URL: "http://test_bucket.example.com/test_key",
Match: func(req *http.Request) bool {
return checkHeaders(req.Header, map[string]string{
return tests.ExpectHeaders(req.Header, map[string]string{
"test_header": "test",
"Authorization": "^.+Credential=123/.+$",
})