Skip to content

Commit

Permalink
test: Remove parallel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Oct 20, 2024
1 parent eddcce1 commit 09d6650
Show file tree
Hide file tree
Showing 17 changed files with 0 additions and 83 deletions.
2 changes: 0 additions & 2 deletions internal/actions/dump/dump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
)

func Test_buildCommand(t *testing.T) {
t.Parallel()
pgpassword := command.NewEnv("PGPASSWORD", "")
mysqlPwd := command.NewEnv("MYSQL_PWD", "")

Expand Down Expand Up @@ -59,7 +58,6 @@ func Test_buildCommand(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
got, err := tt.args.conf.buildCommand()
tt.wantErr(t, err)
assert.Equal(t, tt.want, got)
Expand Down
2 changes: 0 additions & 2 deletions internal/actions/dump/generate_filename_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
)

func TestFilename_Generate(t *testing.T) {
t.Parallel()
type fields struct {
Database string
Namespace string
Expand All @@ -27,7 +26,6 @@ func TestFilename_Generate(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
vars := Filename{
Database: tt.fields.Database,
Namespace: tt.fields.Namespace,
Expand Down
4 changes: 0 additions & 4 deletions internal/actions/restore/restore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
)

func TestRestore_buildCommand(t *testing.T) {
t.Parallel()
pgpassword := command.NewEnv("PGPASSWORD", "")

type fields struct {
Expand Down Expand Up @@ -64,7 +63,6 @@ func TestRestore_buildCommand(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
action := Restore{
Restore: tt.fields.Restore,
Analyze: tt.fields.Analyze,
Expand All @@ -77,7 +75,6 @@ func TestRestore_buildCommand(t *testing.T) {
}

func TestRestore_copy(t *testing.T) {
t.Parallel()
input := "hello world"
var gzipped strings.Builder
gzw := gzip.NewWriter(&gzipped)
Expand All @@ -104,7 +101,6 @@ func TestRestore_copy(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
action := Restore{
Restore: tt.fields.Restore,
Analyze: tt.fields.Analyze,
Expand Down
8 changes: 0 additions & 8 deletions internal/command/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
type panicFunc func(assert.TestingT, assert.PanicTestFunc, ...any) bool

func TestBuilder_Push(t *testing.T) {
t.Parallel()
type fields struct {
cmd []any
}
Expand All @@ -29,7 +28,6 @@ func TestBuilder_Push(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
tt.wantPanic(t, func() {
j := &Builder{
cmd: tt.fields.cmd,
Expand All @@ -42,7 +40,6 @@ func TestBuilder_Push(t *testing.T) {
}

func TestBuilder_String(t *testing.T) {
t.Parallel()
type fields struct {
cmd []any
}
Expand All @@ -60,7 +57,6 @@ func TestBuilder_String(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
tt.wantPanic(t, func() {
j := Builder{
cmd: tt.fields.cmd,
Expand All @@ -73,7 +69,6 @@ func TestBuilder_String(t *testing.T) {
}

func TestBuilder_Unshift(t *testing.T) {
t.Parallel()
type fields struct {
cmd []any
}
Expand All @@ -93,7 +88,6 @@ func TestBuilder_Unshift(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
tt.wantPanic(t, func() {
j := &Builder{
cmd: tt.fields.cmd,
Expand All @@ -106,7 +100,6 @@ func TestBuilder_Unshift(t *testing.T) {
}

func TestNewBuilder(t *testing.T) {
t.Parallel()
type args struct {
p []any
}
Expand All @@ -121,7 +114,6 @@ func TestNewBuilder(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
got := NewBuilder(tt.args.p...)
assert.Equal(t, tt.want, got)
})
Expand Down
4 changes: 0 additions & 4 deletions internal/command/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
)

func TestEnv_Quote(t *testing.T) {
t.Parallel()
type fields struct {
Key string
Value string
Expand All @@ -22,7 +21,6 @@ func TestEnv_Quote(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
e := Env{
Key: tt.fields.Key,
Value: tt.fields.Value,
Expand All @@ -34,7 +32,6 @@ func TestEnv_Quote(t *testing.T) {
}

func TestNewEnv(t *testing.T) {
t.Parallel()
type args struct {
k string
v string
Expand All @@ -48,7 +45,6 @@ func TestNewEnv(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
got := NewEnv(tt.args.k, tt.args.v)
assert.Equal(t, tt.want, got)
})
Expand Down
2 changes: 0 additions & 2 deletions internal/command/split_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
)

func TestSplit_Quote(t *testing.T) {
t.Parallel()
tests := []struct {
name string
s Split
Expand All @@ -24,7 +23,6 @@ func TestSplit_Quote(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
assert.Equalf(t, tt.want, tt.s.Quote(), "String()")
})
}
Expand Down
2 changes: 0 additions & 2 deletions internal/database/detect_dialect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
)

func TestDetectDialect(t *testing.T) {
t.Parallel()
postgresPod := v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
Expand Down Expand Up @@ -86,7 +85,6 @@ func TestDetectDialect(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
got, err := DetectDialect(context.Background(), tt.args.client)
tt.wantErr(t, err)
assert.Equal(t, tt.want, got)
Expand Down
6 changes: 0 additions & 6 deletions internal/database/dialect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
)

func TestNew(t *testing.T) {
t.Parallel()
type args struct {
name string
}
Expand All @@ -36,7 +35,6 @@ func TestNew(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
got, err := New(tt.args.name)
tt.wantErr(t, err)
assert.Equal(t, tt.want, got)
Expand All @@ -45,7 +43,6 @@ func TestNew(t *testing.T) {
}

func TestDetectFormat(t *testing.T) {
t.Parallel()
type args struct {
db config.DBFiler
path string
Expand All @@ -67,14 +64,12 @@ func TestDetectFormat(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
assert.Equalf(t, tt.want, DetectFormat(tt.args.db, tt.args.path), "DetectFormat(%v, %v)", tt.args.db, tt.args.path)
})
}
}

func TestGetExtension(t *testing.T) {
t.Parallel()
type args struct {
db config.DBFiler
format sqlformat.Format
Expand All @@ -95,7 +90,6 @@ func TestGetExtension(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
assert.Equalf(t, tt.want, GetExtension(tt.args.db, tt.args.format), "GetExtension(%v, %v)", tt.args.db, tt.args.format)
})
}
Expand Down
12 changes: 0 additions & 12 deletions internal/database/mariadb/mariadb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
)

func TestMariaDB_DatabaseDropQuery(t *testing.T) {
t.Parallel()
type args struct {
database string
}
Expand All @@ -24,7 +23,6 @@ func TestMariaDB_DatabaseDropQuery(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
ma := MariaDB{}
got := ma.DatabaseDropQuery(tt.args.database)
assert.Equal(t, tt.want, got)
Expand All @@ -33,7 +31,6 @@ func TestMariaDB_DatabaseDropQuery(t *testing.T) {
}

func TestMariaDB_DumpCommand(t *testing.T) {
t.Parallel()
type args struct {
conf config.Dump
}
Expand Down Expand Up @@ -70,7 +67,6 @@ func TestMariaDB_DumpCommand(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
ma := MariaDB{}
got := ma.DumpCommand(tt.args.conf)
assert.Equal(t, tt.want, got)
Expand All @@ -79,7 +75,6 @@ func TestMariaDB_DumpCommand(t *testing.T) {
}

func TestMariaDB_ExecCommand(t *testing.T) {
t.Parallel()
type args struct {
conf config.Exec
}
Expand Down Expand Up @@ -111,7 +106,6 @@ func TestMariaDB_ExecCommand(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
ma := MariaDB{}
got := ma.ExecCommand(tt.args.conf)
assert.Equal(t, tt.want, got)
Expand All @@ -120,7 +114,6 @@ func TestMariaDB_ExecCommand(t *testing.T) {
}

func TestMariaDB_DatabaseListQuery(t *testing.T) {
t.Parallel()
tests := []struct {
name string
want string
Expand All @@ -129,7 +122,6 @@ func TestMariaDB_DatabaseListQuery(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
ma := MariaDB{}
got := ma.DatabaseListQuery()
assert.Equal(t, tt.want, got)
Expand All @@ -138,7 +130,6 @@ func TestMariaDB_DatabaseListQuery(t *testing.T) {
}

func TestMariaDB_PasswordEnvs(t *testing.T) {
t.Parallel()
type args struct {
c config.Global
}
Expand All @@ -152,7 +143,6 @@ func TestMariaDB_PasswordEnvs(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
db := MariaDB{}
got := db.PasswordEnvs(tt.args.c)
assert.Equal(t, tt.want, got)
Expand All @@ -161,7 +151,6 @@ func TestMariaDB_PasswordEnvs(t *testing.T) {
}

func TestMariaDB_RestoreCommand(t *testing.T) {
t.Parallel()
type args struct {
conf config.Restore
inputFormat sqlformat.Format
Expand Down Expand Up @@ -194,7 +183,6 @@ func TestMariaDB_RestoreCommand(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
ma := MariaDB{}
got := ma.RestoreCommand(tt.args.conf, tt.args.inputFormat)
assert.Equal(t, tt.want, got)
Expand Down
Loading

0 comments on commit 09d6650

Please sign in to comment.