diff --git a/src/tests/e2e/rbac.e2e.spec.ts b/src/tests/e2e/rbac.e2e.spec.ts index d9d46e1..8111a37 100644 --- a/src/tests/e2e/rbac.e2e.spec.ts +++ b/src/tests/e2e/rbac.e2e.spec.ts @@ -225,21 +225,21 @@ test('Permission check e2e test', async (t) => { } catch (error) { logger.error(`GOT ERROR: ${error}`); t.fail(`got error: ${error}`); - } finally { - // cleanup - try { - await permit.api.users.delete('auth0|elon'); - await permit.api.tenants.delete('tesla'); - await permit.api.roles.delete('admin'); - await permit.api.roles.delete('viewer'); - await permit.api.resources.delete('document'); - t.is((await permit.api.resources.list()).length, 0); - t.is((await permit.api.roles.list()).length, 0); - t.is((await permit.api.tenants.list()).length, 1); // the default tenant - t.is((await permit.api.users.list()).data.length, 0); - } catch (error) { - logger.error(`GOT ERROR: ${error}`); - t.fail(`got error: ${error}`); - } - } + // } finally { + // // cleanup + // try { + // await permit.api.users.delete('auth0|elon'); + // await permit.api.tenants.delete('tesla'); + // await permit.api.roles.delete('admin'); + // await permit.api.roles.delete('viewer'); + // await permit.api.resources.delete('document'); + // t.is((await permit.api.resources.list()).length, 0); + // t.is((await permit.api.roles.list()).length, 0); + // t.is((await permit.api.tenants.list()).length, 1); // the default tenant + // t.is((await permit.api.users.list()).data.length, 0); + // } catch (error) { + // logger.error(`GOT ERROR: ${error}`); + // t.fail(`got error: ${error}`); + // } + // } }); diff --git a/src/tests/e2e/rebac.e2e.spec.ts b/src/tests/e2e/rebac.e2e.spec.ts index 5bc2e3b..cafe814 100644 --- a/src/tests/e2e/rebac.e2e.spec.ts +++ b/src/tests/e2e/rebac.e2e.spec.ts @@ -590,20 +590,20 @@ test('Permission check e2e test', async (t) => { } catch (error) { logger.error(`GOT ERROR: ${error}`); t.fail(`got error: ${error}`); - } finally { - // cleanup - try { - console.log('cleaning up'); - await permit.api.tenants.delete('cocacola'); - await permit.api.tenants.delete('permit'); - await permit.api.resources.delete('account'); - await permit.api.resources.delete('folder'); - await permit.api.resources.delete('document'); - await permit.api.users.delete('user_authz'); - await permit.api.users.delete('user_permit'); - } catch (error) { - logger.error(`GOT ERROR: ${error}`); - t.fail(`got error: ${error}`); - } - } + // } finally { + // // cleanup + // try { + // console.log('cleaning up'); + // await permit.api.tenants.delete('cocacola'); + // await permit.api.tenants.delete('permit'); + // await permit.api.resources.delete('account'); + // await permit.api.resources.delete('folder'); + // await permit.api.resources.delete('document'); + // await permit.api.users.delete('user_authz'); + // await permit.api.users.delete('user_permit'); + // } catch (error) { + // logger.error(`GOT ERROR: ${error}`); + // t.fail(`got error: ${error}`); + // } + // } });