Skip to content

Commit 9b7a990

Browse files
committed
test
1 parent 5a05e4c commit 9b7a990

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/deploy/functions/services/ailogic.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@ describe("AILogicService", () => {
3030
sinon.restore();
3131
});
3232

33+
describe("requiredProjectBindings", () => {
34+
it("should bind the AI logic service account with the Cloud Run invoker role", async () => {
35+
const bindings = await service.requiredProjectBindings("123456789");
36+
expect(bindings).to.deep.equal([
37+
{
38+
role: "roles/run.invoker",
39+
members: [
40+
"serviceAccount:service-123456789@gcp-sa-firebasevertexai.iam.gserviceaccount.com",
41+
],
42+
},
43+
]);
44+
});
45+
});
46+
3347
describe("validateTrigger", () => {
3448
it("should throw if two regional triggers of same type in same region", () => {
3549
const ep1: backend.Endpoint = {

0 commit comments

Comments
 (0)