Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
package orgintegration_test
import (
"bytes"
"encoding/json"
"testing"
"github.com/Infisical/infisical/tests/internal/apierr"
"github.com/stretchr/testify/require"
)
func jsonBody(t *testing.T, v any) *bytes.Reader {
t.Helper()
raw, err := json.Marshal(v)
require.NoError(t, err)
return bytes.NewReader(raw)
}
func requireStatus(t *testing.T, want, got int, body []byte) {
t.Helper()
require.Equalf(t, want, got, "answered %d: %s", got, apierr.Body(body))
}