File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 39
39
40
40
.PHONY : test-integration
41
41
test-integration :
42
- go test -v -count=1 -tags=integration ./integration/
42
+ CODER_TEST_INTEGRATION=1 go test -v -count=1 ./integration/
Original file line number Diff line number Diff line change 1
- //go:build integration
2
- // +build integration
3
-
4
1
package integration_test
5
2
6
3
import (
@@ -24,6 +21,9 @@ import (
24
21
25
22
func TestDocker (t * testing.T ) {
26
23
t .Parallel ()
24
+ if val , ok := os .LookupEnv ("CODER_TEST_INTEGRATION" ); ! ok || val != "1" {
25
+ t .Skip ("integration tests are skipped unless CODER_TEST_INTEGRATION=true" )
26
+ }
27
27
28
28
// Dockerd just tests that dockerd can spin up and function correctly.
29
29
t .Run ("Dockerd" , func (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package integration
2
2
3
3
import (
4
4
"context"
5
+ "os"
5
6
"os/exec"
6
7
"slices"
7
8
"strings"
@@ -14,6 +15,10 @@ import (
14
15
)
15
16
16
17
func TestDocker_Nvidia (t * testing.T ) {
18
+ t .Parallel ()
19
+ if val , ok := os .LookupEnv ("CODER_TEST_INTEGRATION" ); ! ok || val != "1" {
20
+ t .Skip ("integration tests are skipped unless CODER_TEST_INTEGRATION=true" )
21
+ }
17
22
// Only run this test if the nvidia container runtime is detected.
18
23
// Check if the nvidia runtime is available using `docker info`.
19
24
// The docker client doesn't expose this information so we need to fetch it ourselves.
@@ -22,6 +27,7 @@ func TestDocker_Nvidia(t *testing.T) {
22
27
}
23
28
24
29
t .Run ("Ubuntu" , func (t * testing.T ) {
30
+ t .Parallel ()
25
31
ctx , cancel := context .WithCancel (context .Background ())
26
32
t .Cleanup (cancel )
27
33
@@ -39,6 +45,7 @@ func TestDocker_Nvidia(t *testing.T) {
39
45
})
40
46
41
47
t .Run ("Redhat" , func (t * testing.T ) {
48
+ t .Parallel ()
42
49
ctx , cancel := context .WithCancel (context .Background ())
43
50
t .Cleanup (cancel )
44
51
You can’t perform that action at this time.
0 commit comments