mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-29 08:20:25 +01:00
added basic s3blob tests
This commit is contained in:
1 parent
f799083c4f
commit
ed36add853
13 files changed
+676
-121
No files matched your search
@@ -6,17 +6,18 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3"
|
||||
"github.com/pocketbase/pocketbase/tools/filesystem/internal/s3blob/s3/tests"
|
||||
)
|
||||
|
||||
func TestS3DeleteObject(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
httpClient := NewTestClient(
|
||||
&RequestStub{
|
||||
httpClient := tests.NewClient(
|
||||
&tests.RequestStub{
|
||||
Method: http.MethodDelete,
|
||||
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/.+$",
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user