Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat: corrected the version of golangci lint and added softdelete check

=db64a8e2dcba
diff --git a/.github/workflows/run-backend-go-tests.yml b/.github/workflows/run-backend-go-tests.yml
index 0db6163c3b..754a8cef7a 100644
--- a/.github/workflows/run-backend-go-tests.yml
+++ b/.github/workflows/run-backend-go-tests.yml
@@ -28,7 +28,7 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
- version: v2.2.1
+ version: v2.12.2
working-directory: backend-go
args: --build-tags integration
diff --git a/backend-go/tests/secretmanager/secrets/list_secrets_integration_test.go b/backend-go/tests/secretmanager/secrets/list_secrets_integration_test.go
index b60ab24e6f..806674134b 100644
--- a/backend-go/tests/secretmanager/secrets/list_secrets_integration_test.go
+++ b/backend-go/tests/secretmanager/secrets/list_secrets_integration_test.go
@@ -3,13 +3,16 @@
package secrets_test
import (
+ "context"
"encoding/json"
"fmt"
"net/http/httptest"
"net/url"
"strconv"
"testing"
+ "time"
+ "github.com/jackc/pgx/v5"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -922,6 +925,16 @@ func TestListSecrets_SoftDeletedEnvironment(t *testing.T) {
nodejs.SoftDeleteEnvironment(t, proj.ID, customEnv.ID)
+ t.Run("environment row still exists in DB with softDeletedAt set", func(t *testing.T) {
+ var softDeletedAt *time.Time
+ err := stack.DB().Replica().QueryRow(context.Background(), `
+ SELECT "softDeletedAt" FROM project_environments WHERE id = @envID
+ `, pgx.NamedArgs{"envID": customEnv.ID}).Scan(&softDeletedAt)
+
+ require.NoError(t, err, "environment row should still exist in database")
+ require.NotNil(t, softDeletedAt, "softDeletedAt should be set (not NULL)")
+ })
+
t.Run("soft deleted environment returns not found", func(t *testing.T) {
_, err := listSecrets(t, auth.ActorTypeIdentity, identity.ID, nodejs.OrgID(), &ListSecretsV4Params{
ProjectID: proj.ID,