Files
seaweedfs/test/s3/testutil/server_test.go
T
Chris Lu b8121e0fe4 refactor: modernize S3 integration tests to use weed mini
- Added testutil/server.go with shared server lifecycle management
- Created testutil/server_test.go for server management tests
- Added versioning/s3_test_main.go with automatic TestMain implementation
- Simplified versioning/Makefile to use weed mini for test automation
- Tests now auto-manage weed mini server via TestMain
- Support for USE_EXTERNAL_SERVER=true to run against existing server
- Significant reduction in test infrastructure complexity
- All tests passing with weed mini
2025-12-24 19:20:17 -08:00

28 lines
499 B
Go

package testutil
import (
"testing"
"time"
)
func TestServerStartStop(t *testing.T) {
config := DefaultServerConfig(nil)
config.StartupWait = 30 * time.Second
// Start server
server, err := StartServer(t, config)
if err != nil {
t.Fatalf("Failed to start server: %v", err)
}
// Verify server is running
if server.cmd.Process == nil {
t.Fatal("Server process not started")
}
// Stop server
if err := server.Stop(); err != nil {
t.Fatalf("Failed to stop server: %v", err)
}
}