Skip to content

Commit

Permalink
debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariano Goldman committed Jun 4, 2024
1 parent f96ed72 commit 8686a56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/adapters/worlds-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }> {
Expand Down
7 changes: 6 additions & 1 deletion test/integration/deploy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')}`,
Expand Down Expand Up @@ -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: {
Expand All @@ -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')!)

Expand Down

0 comments on commit 8686a56

Please sign in to comment.