Skip to content

Commit bb79f95

Browse files
Run testarchive unit tests on PRs (#3500)
## Why Feedback in #3453 (comment) recommended not using build tags. This PR enables these tests by default. These tests will be skipped when `-short` flag is provided. Note: We do not specify the `-short` flag in CI so these tests will run by default.
1 parent 8044f95 commit bb79f95

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

internal/testarchive/archive_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//go:build dbr_only
2-
31
package main
42

53
import (
@@ -11,6 +9,12 @@ import (
119
)
1210

1311
func TestArchive(t *testing.T) {
12+
if testing.Short() {
13+
t.Skip("Skipping test in short mode")
14+
}
15+
16+
t.Parallel()
17+
1418
archiveDir := t.TempDir()
1519
binDir := t.TempDir()
1620
repoRoot := "../.."

internal/testarchive/downloader_test.go

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//go:build dbr_only
2-
31
package main
42

53
import (
@@ -12,6 +10,12 @@ import (
1210
)
1311

1412
func TestUvDownloader(t *testing.T) {
13+
if testing.Short() {
14+
t.Skip("Skipping test in short mode")
15+
}
16+
17+
t.Parallel()
18+
1519
tmpDir := t.TempDir()
1620

1721
for _, arch := range []string{"arm64", "amd64"} {
@@ -27,6 +31,12 @@ func TestUvDownloader(t *testing.T) {
2731
}
2832

2933
func TestJqDownloader(t *testing.T) {
34+
if testing.Short() {
35+
t.Skip("Skipping test in short mode")
36+
}
37+
38+
t.Parallel()
39+
3040
tmpDir := t.TempDir()
3141

3242
for _, arch := range []string{"arm64", "amd64"} {
@@ -42,6 +52,12 @@ func TestJqDownloader(t *testing.T) {
4252
}
4353

4454
func TestGoDownloader(t *testing.T) {
55+
if testing.Short() {
56+
t.Skip("Skipping test in short mode")
57+
}
58+
59+
t.Parallel()
60+
4561
tmpDir := t.TempDir()
4662

4763
for _, arch := range []string{"arm64", "amd64"} {

0 commit comments

Comments
 (0)