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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user