Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

test(frontend): pin the silent account lists and the workload identity email

Vincent Huanga52d28a3b52b
diff --git a/frontend/src/components/AuditLogTable.test.tsx b/frontend/src/components/AuditLogTable.test.tsx
index 5f4e97d1d8..ef92df7f03 100644
--- a/frontend/src/components/AuditLogTable.test.tsx
+++ b/frontend/src/components/AuditLogTable.test.tsx
@@ -415,6 +415,10 @@ describe("AuditLogTable", () => {
[ACTORS.serviceAccount.name, serviceAccountFilter],
["serviceaccounts/[email protected]", serviceAccountFilter],
[ACTORS.serviceAccount.email, serviceAccountFilter],
+ [
+ ACTORS.workloadIdentity.email,
+ '(actor == "workloadIdentities/[email protected]" || actor == "users/[email protected]")',
+ ],
[ACTORS.user.email, 'actor == "users/[email protected]"'],
])("filters the actor value %s", async (value, filter) => {
mocks.searchAuditLogs.mockResolvedValue({ auditLogs: [], nextPageToken: "" });
diff --git a/frontend/src/stores/app/index.test.ts b/frontend/src/stores/app/index.test.ts
index ee136a14e8..8024eb3b39 100644
--- a/frontend/src/stores/app/index.test.ts
+++ b/frontend/src/stores/app/index.test.ts
@@ -2082,6 +2082,27 @@ describe("useAppStore", () => {
);
});
+ test("lists service accounts silently when requested", async () => {
+ mocks.listServiceAccounts.mockResolvedValue({
+ serviceAccounts: [],
+ nextPageToken: "",
+ });
+ const store = createAppStore();
+
+ await store.getState().listServiceAccounts({
+ parent: "workspaces/default",
+ pageSize: 20,
+ showDeleted: false,
+ silent: true,
+ });
+
+ expect(
+ mocks.listServiceAccounts.mock.calls[0][1]?.contextValues.get(
+ silentContextKey
+ )
+ ).toBe(true);
+ });
+
test("marks cached service account deleted after delete", async () => {
mocks.deleteServiceAccount.mockResolvedValue({});
const store = createAppStore();
@@ -2135,6 +2156,27 @@ describe("useAppStore", () => {
);
});
+ test("lists workload identities silently when requested", async () => {
+ mocks.listWorkloadIdentities.mockResolvedValue({
+ workloadIdentities: [],
+ nextPageToken: "",
+ });
+ const store = createAppStore();
+
+ await store.getState().listWorkloadIdentities({
+ parent: "workspaces/default",
+ pageSize: 20,
+ showDeleted: false,
+ silent: true,
+ });
+
+ expect(
+ mocks.listWorkloadIdentities.mock.calls[0][1]?.contextValues.get(
+ silentContextKey
+ )
+ ).toBe(true);
+ });
+
test("lists identity providers and replaces the identity provider cache", async () => {
mocks.listIdentityProviders.mockResolvedValue({
identityProviders: [identityProviderA],