commit
90d52ce9b7
1 changed files with 17 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
import tk from "timekeeper"
|
import tk from "timekeeper"
|
||||||
import _ from "lodash"
|
import _ from "lodash"
|
||||||
import { mocks, structures } from "@budibase/backend-core/tests"
|
import { generator, mocks, structures } from "@budibase/backend-core/tests"
|
||||||
import {
|
import {
|
||||||
ScimCreateUserRequest,
|
ScimCreateUserRequest,
|
||||||
ScimGroupResponse,
|
ScimGroupResponse,
|
||||||
|
@ -14,9 +14,14 @@ import { events } from "@budibase/backend-core"
|
||||||
jest.retryTimes(2, { logErrorsBeforeRetry: true })
|
jest.retryTimes(2, { logErrorsBeforeRetry: true })
|
||||||
jest.setTimeout(30000)
|
jest.setTimeout(30000)
|
||||||
|
|
||||||
|
describe("scim", () => {
|
||||||
|
beforeAll(async () => {
|
||||||
|
tk.freeze(mocks.date.MOCK_DATE)
|
||||||
mocks.licenses.useScimIntegration()
|
mocks.licenses.useScimIntegration()
|
||||||
|
|
||||||
describe("scim", () => {
|
await config.setSCIMConfig(true)
|
||||||
|
})
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
jest.resetAllMocks()
|
jest.resetAllMocks()
|
||||||
tk.freeze(mocks.date.MOCK_DATE)
|
tk.freeze(mocks.date.MOCK_DATE)
|
||||||
|
@ -570,8 +575,15 @@ describe("scim", () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
groups = []
|
groups = []
|
||||||
|
|
||||||
for (let i = 0; i < groupCount; i++) {
|
const groupNames = generator.unique(
|
||||||
const body = structures.scim.createGroupRequest()
|
() => generator.word(),
|
||||||
|
groupCount
|
||||||
|
)
|
||||||
|
|
||||||
|
for (const groupName of groupNames) {
|
||||||
|
const body = structures.scim.createGroupRequest({
|
||||||
|
displayName: groupName,
|
||||||
|
})
|
||||||
groups.push(await config.api.scimGroupsAPI.post({ body }))
|
groups.push(await config.api.scimGroupsAPI.post({ body }))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue