Skip to content

Commit 24cae6e

Browse files
committed
Added minimum _test.go files for files that does not have tests.
We use the tool cover for coverage, but if there is no _test.go file, then Go use the tool covdata. At the same time, they removed covdata as a precompiled binary in the distribution. This made the coverage calculation fail for some of us. As described in this discussion golang/go#75031 there is an other option to fix this by modifying the GOTOOLCHAIN variable, but that is too much magic for me and could be very hard to debug for the next person who stumbles over this.
1 parent d211fd4 commit 24cae6e

5 files changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package bitbucket_test
2+
3+
import "testing"
4+
5+
func TestPlaceholder(t *testing.T) {
6+
// We use the tool cover for coverage, but if there is no _test.go file, then
7+
// Go use the tool covdata. At the same time, they removed covdata as a precompiled
8+
// binary in the distribution. This made the coverage calculation fail for some of us.
9+
}

internal/logger/logger_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package logger_test
2+
3+
import "testing"
4+
5+
func TestPlaceholder(t *testing.T) {
6+
// We use the tool cover for coverage, but if there is no _test.go file, then
7+
// Go use the tool covdata. At the same time, they removed covdata as a precompiled
8+
// binary in the distribution. This made the coverage calculation fail for some of us.
9+
}

internal/output/output_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package output_test
2+
3+
import "testing"
4+
5+
func TestPlaceholder(t *testing.T) {
6+
// We use the tool cover for coverage, but if there is no _test.go file, then
7+
// Go use the tool covdata. At the same time, they removed covdata as a precompiled
8+
// binary in the distribution. This made the coverage calculation fail for some of us.
9+
}

internal/sonar/sonar_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package sonar_test
2+
3+
import "testing"
4+
5+
func TestPlaceholder(t *testing.T) {
6+
// We use the tool cover for coverage, but if there is no _test.go file, then
7+
// Go use the tool covdata. At the same time, they removed covdata as a precompiled
8+
// binary in the distribution. This made the coverage calculation fail for some of us.
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package testHelpers_test
2+
3+
import "testing"
4+
5+
func TestPlaceholder(t *testing.T) {
6+
// We use the tool cover for coverage, but if there is no _test.go file, then
7+
// Go use the tool covdata. At the same time, they removed covdata as a precompiled
8+
// binary in the distribution. This made the coverage calculation fail for some of us.
9+
}

0 commit comments

Comments
 (0)