fix: S3 copying test Makefile syntax and add S3_ENDPOINT env support (#8042)

* fix: S3 copying test Makefile syntax and add S3_ENDPOINT env support

* fix: add weed mini to stop-seaweedfs target

Ensure weed mini process is properly killed when stopping SeaweedFS,
matching the process started in start-seaweedfs target.

* Clean up PID file in stop-seaweedfs and clean targets

Address review feedback to ensure /tmp/weed-mini.pid is removed
for a clean state after tests.
This commit is contained in:
madavic
2026-01-16 21:23:12 +01:00
committed by GitHub
parent f8d4583ecd
commit 86c61e86c9
2 changed files with 14 additions and 21 deletions

View File

@@ -8,6 +8,7 @@ import (
"io"
mathrand "math/rand"
"net/url"
"os"
"strings"
"testing"
"time"
@@ -43,9 +44,11 @@ var defaultConfig = &S3TestConfig{
SkipVerifySSL: true,
}
// Initialize math/rand with current time to ensure randomness
func init() {
mathrand.Seed(time.Now().UnixNano())
if endpoint := os.Getenv("S3_ENDPOINT"); endpoint != "" {
defaultConfig.Endpoint = endpoint
}
}
// getS3Client creates an AWS S3 client for testing