Skip to content

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

tests: work in progress on platform blackbox suites

Claudef16fabff0592
diff --git a/tests/suites/admin/admin_test.go b/tests/suites/admin/admin_test.go
index 4769e3e30b..d321be0bcb 100644
--- a/tests/suites/admin/admin_test.go
+++ b/tests/suites/admin/admin_test.go
@@ -3,8 +3,8 @@ package admin_test
import (
"context"
"crypto/rand"
- "fmt"
"encoding/json"
+ "fmt"
"net/http"
"testing"
diff --git a/tests/suites/auditlog/access_test.go b/tests/suites/auditlog/access_test.go
index 1d7718a742..a44baa94dd 100644
--- a/tests/suites/auditlog/access_test.go
+++ b/tests/suites/auditlog/access_test.go
@@ -50,9 +50,9 @@ func TestAuditLog_Access(t *testing.T) {
orgWide := events(t, tn.Admin, filter{EventType: new("create-secret")})
// Assert
- t.Logf("PROBE %d %s", byProject.StatusCode(), byProject.Body)
require.Error(t, byProjectErr)
- require.Containsf(t, []int{http.StatusForbidden, http.StatusNotFound}, byProject.StatusCode(), "%s", apierr.Body(byProject.Body))
+ require.Equalf(t, http.StatusForbidden, byProject.StatusCode(), "%s", apierr.Body(byProject.Body))
+ require.Equal(t, "This project does not belong to your selected organization.", apierr.Message(byProject.Body))
require.NotContains(t, string(byProject.Body), "THEIRS")
require.Empty(t, orgWide)
})
diff --git a/tests/suites/organization/organization_test.go b/tests/suites/organization/organization_test.go
index e618e6f5fe..b00ebdde5e 100644
--- a/tests/suites/organization/organization_test.go
+++ b/tests/suites/organization/organization_test.go
@@ -66,7 +66,9 @@ func TestOrganization_Create(t *testing.T) {
requireStatus(t, http.StatusOK, res.StatusCode(), res.Body)
orgID := res.JSON200.Organization.Id
scoped := selectOrg(t, tn, creator, orgID)
- t.Cleanup(func() { _, _ = scoped.DeleteOrganizationWithResponse(context.WithoutCancel(t.Context()), orgID.String()) })
+ t.Cleanup(func() {
+ _, _ = scoped.DeleteOrganizationWithResponse(context.WithoutCancel(t.Context()), orgID.String())
+ })
perms, err := scoped.GetOrganizationPermissionsWithResponse(t.Context())
require.NoError(t, err)
requireStatus(t, http.StatusOK, perms.StatusCode(), perms.Body)