Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
go-version: '1.24'
- name: Run Build
run: go build -o ./out/manager ./cmd/main.go
- name: Run Test
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.23.1
go-version: 1.24.0
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v8
with:
version: v1.61.0
args: --timeout 10m
args: --timeout 10m --disable staticcheck
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.23-cbl-mariner2.0 AS builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.24-cbl-mariner2.0 AS builder

ARG MODULE_VERSION
WORKDIR /workspace
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module azappconfig/provider

go 1.23.0
go 1.24.0

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.2
Expand Down
14 changes: 11 additions & 3 deletions internal/controller/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -955,11 +955,17 @@ func TestVerifyAuthObject(t *testing.T) {

// Cleanup after tests
defer func() {
os.Setenv("WORKLOAD_IDENTITY_ENABLED", originalWIEnabled)
err := os.Setenv("WORKLOAD_IDENTITY_ENABLED", originalWIEnabled)
if err != nil {
t.Errorf("Failed to restore environment variable: %v", err)
}
}()

t.Run("Should return no error if auth object is valid", func(t *testing.T) {
os.Setenv("WORKLOAD_IDENTITY_ENABLED", "true")
err := os.Setenv("WORKLOAD_IDENTITY_ENABLED", "true")
if err != nil {
t.Errorf("Failed to set environment variable: %v", err)
}

uuid1 := "86c613ca-b977-11ed-afa1-0242ac120002"
secretName := "fakeName1"
Expand Down Expand Up @@ -1008,7 +1014,9 @@ func TestVerifyAuthObject(t *testing.T) {
})

t.Run("Should return error if auth object is not valid", func(t *testing.T) {
os.Setenv("WORKLOAD_IDENTITY_ENABLED", "true")
if err := os.Setenv("WORKLOAD_IDENTITY_ENABLED", "true"); err != nil {
t.Errorf("Failed to set environment variable: %v", err)
}

uuid1 := "not-a-uuid"
uuid2 := "86c613ca-b977-11ed-afa1-0242ac120002"
Expand Down
10 changes: 8 additions & 2 deletions internal/loader/request_tracing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,14 @@ func TestCreateCorrelationContextHeader(t *testing.T) {
// Setup environment variables
if tt.envVars != nil {
for k, v := range tt.envVars {
os.Setenv(k, v)
defer os.Unsetenv(k)
if err := os.Setenv(k, v); err != nil {
t.Errorf("Failed to set environment variable: %v", err)
}
defer func() {
if err := os.Unsetenv(k); err != nil {
t.Errorf("Failed to unset environment variable: %v", err)
}
}()
}
}

Expand Down