Skip to content

Commit

Permalink
Preserves proper test cases when making tests paralllel
Browse files Browse the repository at this point in the history
  • Loading branch information
gdavison committed Aug 6, 2020
1 parent e52232f commit b8ea66e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/blocks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ func TestCmdBlocksDefault(t *testing.T) {
t.Parallel()

for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -210,6 +211,7 @@ func TestCmdBlocksVerbose(t *testing.T) {
t.Parallel()

for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 2 additions & 0 deletions cli/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func TestCmdDiffDefault(t *testing.T) {
t.Parallel()

for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -154,6 +155,7 @@ func TestCmdDiffVerbose(t *testing.T) {
t.Parallel()

for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

Expand Down
4 changes: 4 additions & 0 deletions cli/fmt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func TestCmdFmtStdinDefault(t *testing.T) {
t.Parallel()

for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -191,6 +192,7 @@ func TestCmdFmtStdinVerbose(t *testing.T) {
t.Parallel()

for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -298,6 +300,7 @@ func TestCmdFmtFileDefault(t *testing.T) {
t.Parallel()

for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -421,6 +424,7 @@ func TestCmdFmtFileVerbose(t *testing.T) {
t.Parallel()

for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

Expand Down
4 changes: 4 additions & 0 deletions cli/upgrade012_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func TestCmdUpgrade012StdinDefault(t *testing.T) {
t.Parallel()

for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -160,6 +161,7 @@ func TestCmdUpgrade012StdinVerbose(t *testing.T) {
t.Parallel()

for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -253,6 +255,7 @@ func TestCmdUpgrade012File(t *testing.T) {
t.Parallel()

for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -359,6 +362,7 @@ func TestCmdUpgrade012FileVerbose(t *testing.T) {
t.Parallel()

for _, testcase := range testcases {
testcase := testcase
t.Run(testcase.name, func(t *testing.T) {
t.Parallel()

Expand Down

0 comments on commit b8ea66e

Please sign in to comment.