forked from TrueCloudLab/frostfs-s3-gw
[#713] Update tests
Add bearer token to test context Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
1a21e6e6e8
commit
cb55d36063
13 changed files with 244 additions and 199 deletions
|
@ -1349,7 +1349,7 @@ func createAccessBox(t *testing.T) *accessbox.Box {
|
|||
}
|
||||
|
||||
func createBucket(t *testing.T, tc *handlerContext, bktName string, box *accessbox.Box) *data.BucketInfo {
|
||||
w, r := prepareTestRequest(t, bktName, "", nil)
|
||||
w, r := prepareTestRequest(tc, bktName, "", nil)
|
||||
ctx := context.WithValue(r.Context(), api.BoxData, box)
|
||||
r = r.WithContext(ctx)
|
||||
tc.Handler().CreateBucketHandler(w, r)
|
||||
|
@ -1361,7 +1361,7 @@ func createBucket(t *testing.T, tc *handlerContext, bktName string, box *accessb
|
|||
}
|
||||
|
||||
func putBucketACL(t *testing.T, tc *handlerContext, bktName string, box *accessbox.Box, header map[string]string) {
|
||||
w, r := prepareTestRequest(t, bktName, "", nil)
|
||||
w, r := prepareTestRequest(tc, bktName, "", nil)
|
||||
for key, val := range header {
|
||||
r.Header.Set(key, val)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue