Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix tests #84

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/pr-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ on:
pull_request:
branches:
- main
env:
GOTOOLCHAIN: local
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.21", "1.22"]
go: ["1.22", "1.23"]
name: Test on Go ${{ matrix.go }}
timeout-minutes: 10
steps:
Expand All @@ -19,7 +21,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go}}
go-version: ${{ matrix.go }}
check-latest: true

- name: Install just
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Submitting pull requests
Developing Cerbos Go SDK
------------------------

We currently require Go 1.20.x for development. [Just](https://just.systems/man/en/chapter_1.html) is used for build tasks. Run `just` at the root of the directory to see the list of available targets.
We currently require Go 1.22.x for development. [Just](https://just.systems/man/en/chapter_1.html) is used for build tasks. Run `just` at the root of the directory to see the list of available targets.
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