Skip to content

Commit

Permalink
Skip UDS tests if not running on Linux
Browse files Browse the repository at this point in the history
docker/for-mac#483

Signed-off-by: Andrew Haines <[email protected]>
  • Loading branch information
haines committed Nov 1, 2024
1 parent 1e30995 commit 521649a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cerbos/grpc_linux_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright 2021-2024 Zenauth Ltd.
// SPDX-License-Identifier: Apache-2.0

//go:build tests && linux

package cerbos_test

const osSupportsUDS = true
8 changes: 8 additions & 0 deletions cerbos/grpc_other_oses_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright 2021-2024 Zenauth Ltd.
// SPDX-License-Identifier: Apache-2.0

//go:build tests && !linux

package cerbos_test

const osSupportsUDS = false
4 changes: 4 additions & 0 deletions cerbos/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ func TestGRPCClient(t *testing.T) {
})

t.Run("uds", func(t *testing.T) {
if !osSupportsUDS {
t.Skip("Sharing a Unix domain socket over a Docker bind mount is not supported on this operating system")
}

tempDir := t.TempDir()
s, err := launcher.Launch(testutil.LaunchConf{
ConfFilePath: tc.confFilePath,
Expand Down

0 comments on commit 521649a

Please sign in to comment.