test: proxy engine edge cases + storage/server minio retry

Cover denied, HEAD (cached/uncached/denied), stale-on-error, circuit-open,
and mutable revalidation (304) paths. proxy ~8->58%.
This commit is contained in:
2026-07-03 13:11:09 +10:00
parent 696a1955b3
commit 21579c1ec0
3 changed files with 286 additions and 2 deletions
+8 -1
View File
@@ -7,6 +7,7 @@ import (
"os"
"strings"
"testing"
"time"
"git.unkin.net/unkin/artifactapi/internal/testsupport"
)
@@ -19,7 +20,13 @@ func TestMain(m *testing.M) {
if err != nil {
os.Exit(m.Run())
}
s3, err := NewS3(conn.Endpoint, conn.AccessKey, conn.SecretKey, "test-bucket", false, "")
var s3 *S3
for i := 0; i < 20; i++ { // MinIO can report ready before bucket ops succeed
if s3, err = NewS3(conn.Endpoint, conn.AccessKey, conn.SecretKey, "test-bucket", false, ""); err == nil {
break
}
time.Sleep(500 * time.Millisecond)
}
if err != nil {
terminate()
panic(err)