From 8686a56ef2ebc76bce8d92b15f51730bbe7801cb Mon Sep 17 00:00:00 2001 From: Mariano Goldman Date: Mon, 22 Apr 2024 10:31:35 -0300 Subject: [PATCH] debug logs --- src/adapters/worlds-manager.ts | 4 +++- test/integration/deploy.spec.ts | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/adapters/worlds-manager.ts b/src/adapters/worlds-manager.ts index dd39c21b..62e396d8 100644 --- a/src/adapters/worlds-manager.ts +++ b/src/adapters/worlds-manager.ts @@ -148,7 +148,9 @@ export async function createWorldsManagerComponent({ DO UPDATE SET permissions = ${JSON.stringify(permissions)}::json, updated_at = ${new Date()} ` - await database.query(sql) + const result = await database.query(sql) + console.log(`done storing permissions for ${worldName}`, result.rows) + console.log('all', (await database.query(SQL`SELECT * FROM worlds`)).rows) } async function getDeployedWorldCount(): Promise<{ ens: number; dcl: number }> { diff --git a/test/integration/deploy.spec.ts b/test/integration/deploy.spec.ts index 2d3ab9d1..543daa7f 100644 --- a/test/integration/deploy.spec.ts +++ b/test/integration/deploy.spec.ts @@ -29,6 +29,7 @@ test('deployment works', function ({ components, stubComponents }) { identity = await getIdentity() worldName = components.worldCreator.randomWorldName() + console.log('worldName', worldName) contentClient = createContentClient({ url: `http://${await config.requireString('HTTP_SERVER_HOST')}:${await config.requireNumber('HTTP_SERVER_PORT')}`, @@ -113,12 +114,14 @@ test('deployment works', function ({ components, stubComponents }) { Sinon.assert.calledWithMatch(stubComponents.metrics.increment, 'world_deployments_counter', { kind: 'dcl-name' }) }) - it('creates an entity and deploys it (authorized wallet)', async () => { + it.only('creates an entity and deploys it (authorized wallet)', async () => { const { storage, worldsManager } = components const { snsClient } = stubComponents const delegatedIdentity = await getIdentity() + console.log(await worldsManager.getMetadataForWorld(worldName)) + const permissions: Permissions = { ...defaultPermissions(), deployment: { @@ -128,6 +131,8 @@ test('deployment works', function ({ components, stubComponents }) { } await worldsManager.storePermissions(worldName, permissions) + console.log(await worldsManager.getMetadataForWorld(worldName)) + entityFiles.set('abc.txt', stringToUtf8Bytes(makeid(100))) const fileHash = await hashV1(entityFiles.get('abc.txt')!)