Browse Source

fix: use relative imports for testutil in all s3_test_main.go files

- Change imports from absolute module path 'github.com/seaweedfs/seaweedfs/test/s3/testutil'
  to relative path '../testutil'
- Fixes module resolution issues when running tests from individual directories
- All test directories now compile and load testutil correctly
- Enables tests to run with 'go test ./...' from any test subdirectory
feature/modernize-s3-tests
Chris Lu 2 months ago
parent
commit
d762f8d58e
  1. 10
      test/s3/acl/s3_test_main.go
  2. 10
      test/s3/basic/s3_test_main.go
  3. 4
      test/s3/copying/s3_test_main.go
  4. 4
      test/s3/cors/s3_test_main.go
  5. 4
      test/s3/delete/s3_test_main.go
  6. 4
      test/s3/etag/s3_test_main.go
  7. 4
      test/s3/filer_group/s3_test_main.go
  8. 10
      test/s3/iam/s3_test_main.go
  9. 4
      test/s3/remote_cache/s3_test_main.go
  10. 4
      test/s3/retention/s3_test_main.go
  11. 4
      test/s3/sse/s3_test_main.go
  12. 4
      test/s3/tagging/s3_test_main.go
  13. 2
      test/s3/versioning/s3_test_main.go

10
test/s3/acl/s3_test_main.go

@ -1,14 +1,14 @@
package acl
import (
"fmt"
"os"
"testing"
"fmt"
"os"
"testing"
"github.com/seaweedfs/seaweedfs/test/s3/testutil"
"../testutil"
)
var testServer *testutil.TestServer
var testServer *testutil.Server
// TestMain sets up and tears down the test environment using weed mini
func TestMain(m *testing.M) {

10
test/s3/basic/s3_test_main.go

@ -1,14 +1,14 @@
package basic
import (
"fmt"
"os"
"testing"
"fmt"
"os"
"testing"
"github.com/seaweedfs/seaweedfs/test/s3/testutil"
"../testutil"
)
var testServer *testutil.TestServer
var testServer *testutil.Server
// TestMain sets up and tears down the test environment using weed mini
func TestMain(m *testing.M) {

4
test/s3/copying/s3_test_main.go

@ -5,10 +5,10 @@ import (
"os"
"testing"
"github.com/seaweedfs/seaweedfs/test/s3/testutil"
"../testutil"
)
var testServer *testutil.TestServer
var testServer *testutil.Server
// TestMain sets up and tears down the test environment using weed mini
func TestMain(m *testing.M) {

4
test/s3/cors/s3_test_main.go

@ -5,10 +5,10 @@ import (
"os"
"testing"
"github.com/seaweedfs/seaweedfs/test/s3/testutil"
"../testutil"
)
var testServer *testutil.TestServer
var testServer *testutil.Server
// TestMain sets up and tears down the test environment using weed mini
func TestMain(m *testing.M) {

4
test/s3/delete/s3_test_main.go

@ -5,10 +5,10 @@ import (
"os"
"testing"
"github.com/seaweedfs/seaweedfs/test/s3/testutil"
"../testutil"
)
var testServer *testutil.TestServer
var testServer *testutil.Server
// TestMain sets up and tears down the test environment using weed mini
func TestMain(m *testing.M) {

4
test/s3/etag/s3_test_main.go

@ -5,10 +5,10 @@ import (
"os"
"testing"
"github.com/seaweedfs/seaweedfs/test/s3/testutil"
"../testutil"
)
var testServer *testutil.TestServer
var testServer *testutil.Server
// TestMain sets up and tears down the test environment using weed mini
func TestMain(m *testing.M) {

4
test/s3/filer_group/s3_test_main.go

@ -5,10 +5,10 @@ import (
"os"
"testing"
"github.com/seaweedfs/seaweedfs/test/s3/testutil"
"../testutil"
)
var testServer *testutil.TestServer
var testServer *testutil.Server
// TestMain sets up and tears down the test environment using weed mini
func TestMain(m *testing.M) {

10
test/s3/iam/s3_test_main.go

@ -1,14 +1,14 @@
package iam
import (
"fmt"
"os"
"testing"
"fmt"
"os"
"testing"
"github.com/seaweedfs/seaweedfs/test/s3/testutil"
"../testutil"
)
var testServer *testutil.TestServer
var testServer *testutil.Server
// TestMain sets up and tears down the test environment using weed mini
func TestMain(m *testing.M) {

4
test/s3/remote_cache/s3_test_main.go

@ -5,10 +5,10 @@ import (
"os"
"testing"
"github.com/seaweedfs/seaweedfs/test/s3/testutil"
"../testutil"
)
var testServer *testutil.TestServer
var testServer *testutil.Server
// TestMain sets up and tears down the test environment using weed mini
func TestMain(m *testing.M) {

4
test/s3/retention/s3_test_main.go

@ -5,10 +5,10 @@ import (
"os"
"testing"
"github.com/seaweedfs/seaweedfs/test/s3/testutil"
"../testutil"
)
var testServer *testutil.TestServer
var testServer *testutil.Server
// TestMain sets up and tears down the test environment using weed mini
func TestMain(m *testing.M) {

4
test/s3/sse/s3_test_main.go

@ -5,10 +5,10 @@ import (
"os"
"testing"
"github.com/seaweedfs/seaweedfs/test/s3/testutil"
"../testutil"
)
var testServer *testutil.TestServer
var testServer *testutil.Server
// TestMain sets up and tears down the test environment using weed mini
func TestMain(m *testing.M) {

4
test/s3/tagging/s3_test_main.go

@ -5,10 +5,10 @@ import (
"os"
"testing"
"github.com/seaweedfs/seaweedfs/test/s3/testutil"
"../testutil"
)
var testServer *testutil.TestServer
var testServer *testutil.Server
// TestMain sets up and tears down the test environment using weed mini
func TestMain(m *testing.M) {

2
test/s3/versioning/s3_test_main.go

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/seaweedfs/seaweedfs/test/s3/testutil"
"../testutil"
)
var testServer *testutil.TestServer

Loading…
Cancel
Save