1
0
Fork 0
mirror of synced 2024-07-07 15:25:52 +12:00

Rename name for id

This commit is contained in:
adrinr 2023-02-03 12:09:56 +00:00
parent 4b4b9cce08
commit 2e29ac9ec7
5 changed files with 5 additions and 5 deletions

View file

@ -14,7 +14,7 @@ describe("utils", () => {
})
it("should call platform logout", async () => {
await doInTenant(structures.tenant.name(), async () => {
await doInTenant(structures.tenant.id(), async () => {
const ctx = structures.koa.newContext()
await utils.platformLogout({ ctx, userId: "test" })
expect(events.auth.logout).toBeCalledTimes(1)

View file

@ -1,5 +1,5 @@
import { newid } from "../../../src/newid"
export function name() {
export function id() {
return `tenant-${newid()}`
}

View file

@ -149,7 +149,7 @@ class TestConfiguration {
async init(appName = newid()) {
this.defaultUserValues = this.populateDefaultUserValues()
if (context.isMultiTenant()) {
this.tenantId = structures.tenant.name()
this.tenantId = structures.tenant.id()
}
if (!this.started) {

View file

@ -135,7 +135,7 @@ class TestConfiguration {
async beforeAll() {
try {
this.#tenantId = structures.tenant.name()
this.#tenantId = structures.tenant.id()
// Running tests in parallel causes issues creating the globaldb twice. This ensures the db is properly created before starting
await retry(async () => await this.createDefaultUser())

View file

@ -100,7 +100,7 @@ export class UserAPI extends TestAPI {
request = {
email: structures.email(),
password: generator.string(),
tenantId: structures.tenant.name(),
tenantId: structures.tenant.id(),
}
}
const res = await this.request