Skip to content

Commit 4061ab6

Browse files
committed
[ci skip] skip docker integration test on non-linux
1 parent 828bcb2 commit 4061ab6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

agent/containers_internal_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package agent
22

33
import (
4+
"runtime"
45
"strings"
56
"testing"
67
"time"
@@ -17,8 +18,15 @@ import (
1718
"github.com/coder/quartz"
1819
)
1920

21+
// TestDockerCLIContainerLister tests the happy path of the
22+
// dockerCLIContainerLister.List method. It starts a container with a known
23+
// label, lists the containers, and verifies that the expected container is
24+
// returned. The container is deleted after the test is complete.
2025
func TestDockerCLIContainerLister(t *testing.T) {
2126
t.Parallel()
27+
if runtime.GOOS != "linux" {
28+
t.Skip("creating containers on non-linux runners is slow and flaky")
29+
}
2230

2331
pool, err := dockertest.NewPool("")
2432
require.NoError(t, err, "Could not connect to docker")
@@ -64,6 +72,8 @@ func TestDockerCLIContainerLister(t *testing.T) {
6472
assert.True(t, found, "Expected to find container with label 'com.coder.test=%s'", testLabelValue)
6573
}
6674

75+
// TestContainersHandler tests the containersHandler.getContainers method using
76+
// a mock implementation. It specifically tests caching behavior.
6777
func TestContainersHandler(t *testing.T) {
6878
t.Parallel()
6979

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy