Skip to content

Commit 3039d6b

Browse files
committed
Migrated toolchain directive to go.work. Skip k8s auth test in github actions due to container networking issues.
1 parent 23236e0 commit 3039d6b

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

go.work

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
go 1.21
22

3+
toolchain go1.21.0
4+
35
use (
46
.
57
./store/awsrds

store/vault/auth/kubernetes_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ var (
5555
}
5656
)
5757

58+
func runningInGithubActions() bool {
59+
return os.Getenv("GITHUB_ACTIONS") == "true"
60+
}
61+
5862
// this HandlerFunc mocks out an response from k8s's tokenreviews endpoint.
5963
func tokenReviewHandler(w http.ResponseWriter, r *http.Request) {
6064
if r.URL.Path != "/apis/authentication.k8s.io/v1/tokenreviews" {
@@ -90,6 +94,10 @@ func tokenReviewHandler(w http.ResponseWriter, r *http.Request) {
9094
}
9195

9296
func TestKubernetesAuth(t *testing.T) {
97+
if runningInGithubActions() {
98+
t.Skip("Skipping until testcontainers-go supports docker networking and network aliases")
99+
}
100+
93101
srv := &httptest.Server{
94102
Listener: func() net.Listener {
95103
// We need to bind to 0.0.0.0 to ensure that the docker container can hit this test server

store/vault/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module github.com/davepgreene/go-db-credential-refresh/store/vault
22

33
go 1.21
44

5-
toolchain go1.21.5
65

76
replace github.com/davepgreene/go-db-credential-refresh => ../../
87

0 commit comments

Comments
 (0)