From 88ca9fb62d316d8320a55601e99ab631e21078fd Mon Sep 17 00:00:00 2001 From: Lahiru Maramba Date: Sun, 3 Nov 2024 15:40:06 -0500 Subject: [PATCH] fix integration tests --- src/app/credential-internal.ts | 3 ++- test/integration/data-connect.spec.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/credential-internal.ts b/src/app/credential-internal.ts index 01aa00d896..0c1b1489ba 100644 --- a/src/app/credential-internal.ts +++ b/src/app/credential-internal.ts @@ -147,7 +147,8 @@ export class ServiceAccountCredential implements Credential { public async getAccessToken(): Promise { const googleAuth = this.getGoogleAuth(); - const client = await googleAuth.getClient(); + const client = googleAuth.fromJSON(this.serviceAccountPathOrObject as object); + //const client = await googleAuth.getClient(); await client.getAccessToken(); const credentials = client.credentials; return populateCredential(credentials); diff --git a/test/integration/data-connect.spec.ts b/test/integration/data-connect.spec.ts index 32ea83cb87..fe5f565429 100644 --- a/test/integration/data-connect.spec.ts +++ b/test/integration/data-connect.spec.ts @@ -99,7 +99,7 @@ describe('getDataConnect()', () => { user_upsert(data: { uid: $id, address: "32 St.", name: "Fred" }) }`; describe('executeGraphql()', () => { - it('executeGraphql() successfully executes a GraphQL mutation', async () => { + it.only('executeGraphql() successfully executes a GraphQL mutation', async () => { const resp = await getDataConnect(connectorConfig).executeGraphql( upsertUser, { variables: { id: userId } } );