feat: Added integration tests for bypass governance retention functionality

This commit is contained in:
jonaustin09
2024-05-28 15:17:25 -04:00
parent fb27e2703e
commit 9e8458a09f
5 changed files with 800 additions and 310 deletions
+1 -2
View File
@@ -1383,7 +1383,7 @@ func (c S3ApiController) PutActions(ctx *fiber.Ctx) error {
})
}
bypassHdr := ctx.Get("")
bypassHdr := ctx.Get("X-Amz-Bypass-Governance-Retention")
bypass := bypassHdr == "true"
if bypass {
policy, err := c.be.GetBucketPolicy(ctx.Context(), bucket)
@@ -2053,7 +2053,6 @@ func (c S3ApiController) DeleteActions(ctx *fiber.Ctx) error {
isRoot := ctx.Locals("isRoot").(bool)
parsedAcl := ctx.Locals("parsedAcl").(auth.ACL)
bypass := ctx.Get("X-Amz-Bypass-Governance-Retention")
fmt.Println("bypass: ", bypass)
if keyEnd != "" {
key = strings.Join([]string{key, keyEnd}, "/")