File tree Expand file tree Collapse file tree 6 files changed +25
-12
lines changed Expand file tree Collapse file tree 6 files changed +25
-12
lines changed Original file line number Diff line number Diff line change 1919 - name : Set up Go
2020 uses : actions/setup-go@v4
2121 with :
22- go-version : ' 1.23 '
22+ go-version : ' 1.24 '
2323 - name : Run Build
2424 run : go build -o ./out/manager ./cmd/main.go
2525 - name : Run Test
Original file line number Diff line number Diff line change 2222 - uses : actions/checkout@v4
2323 - uses : actions/setup-go@v5
2424 with :
25- go-version : 1.23.1
25+ go-version : 1.24.0
2626 - name : golangci-lint
27- uses : golangci/golangci-lint-action@v6
27+ uses : golangci/golangci-lint-action@v8
2828 with :
29- version : v1.61.0
30- args : --timeout 10m
29+ args : --timeout 10m --disable staticcheck
Original file line number Diff line number Diff line change 11# Build the manager binary
2- FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.23 -cbl-mariner2.0 AS builder
2+ FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.24 -cbl-mariner2.0 AS builder
33
44ARG MODULE_VERSION
55WORKDIR /workspace
Original file line number Diff line number Diff line change 11module azappconfig/provider
22
3- go 1.23 .0
3+ go 1.24 .0
44
55require (
66 github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.2
Original file line number Diff line number Diff line change @@ -955,11 +955,17 @@ func TestVerifyAuthObject(t *testing.T) {
955955
956956 // Cleanup after tests
957957 defer func () {
958- os .Setenv ("WORKLOAD_IDENTITY_ENABLED" , originalWIEnabled )
958+ err := os .Setenv ("WORKLOAD_IDENTITY_ENABLED" , originalWIEnabled )
959+ if err != nil {
960+ t .Errorf ("Failed to restore environment variable: %v" , err )
961+ }
959962 }()
960963
961964 t .Run ("Should return no error if auth object is valid" , func (t * testing.T ) {
962- os .Setenv ("WORKLOAD_IDENTITY_ENABLED" , "true" )
965+ err := os .Setenv ("WORKLOAD_IDENTITY_ENABLED" , "true" )
966+ if err != nil {
967+ t .Errorf ("Failed to set environment variable: %v" , err )
968+ }
963969
964970 uuid1 := "86c613ca-b977-11ed-afa1-0242ac120002"
965971 secretName := "fakeName1"
@@ -1008,7 +1014,9 @@ func TestVerifyAuthObject(t *testing.T) {
10081014 })
10091015
10101016 t .Run ("Should return error if auth object is not valid" , func (t * testing.T ) {
1011- os .Setenv ("WORKLOAD_IDENTITY_ENABLED" , "true" )
1017+ if err := os .Setenv ("WORKLOAD_IDENTITY_ENABLED" , "true" ); err != nil {
1018+ t .Errorf ("Failed to set environment variable: %v" , err )
1019+ }
10121020
10131021 uuid1 := "not-a-uuid"
10141022 uuid2 := "86c613ca-b977-11ed-afa1-0242ac120002"
Original file line number Diff line number Diff line change @@ -138,8 +138,14 @@ func TestCreateCorrelationContextHeader(t *testing.T) {
138138 // Setup environment variables
139139 if tt .envVars != nil {
140140 for k , v := range tt .envVars {
141- os .Setenv (k , v )
142- defer os .Unsetenv (k )
141+ if err := os .Setenv (k , v ); err != nil {
142+ t .Errorf ("Failed to set environment variable: %v" , err )
143+ }
144+ defer func () {
145+ if err := os .Unsetenv (k ); err != nil {
146+ t .Errorf ("Failed to unset environment variable: %v" , err )
147+ }
148+ }()
143149 }
144150 }
145151
You can’t perform that action at this time.
0 commit comments