mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-05 23:53:21 +00:00
[PM-26671] Google workspace integration tests (#894)
Add tests for Google Workspace - not enabled in CI yet
This commit is contained in:
26
utils/request-builder-helper.ts
Normal file
26
utils/request-builder-helper.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { GetUniqueString } from "@/jslib/common/spec/utils";
|
||||
|
||||
import { GroupEntry } from "../src/models/groupEntry";
|
||||
import { UserEntry } from "../src/models/userEntry";
|
||||
|
||||
export function userSimulator(userCount: number): UserEntry[] {
|
||||
const users: UserEntry[] = [];
|
||||
while (userCount > 0) {
|
||||
const userEntry = new UserEntry();
|
||||
userEntry.email = GetUniqueString() + "@example.com";
|
||||
users.push(userEntry);
|
||||
userCount--;
|
||||
}
|
||||
return users;
|
||||
}
|
||||
|
||||
export function groupSimulator(groupCount: number): GroupEntry[] {
|
||||
const groups: GroupEntry[] = [];
|
||||
while (groupCount > 0) {
|
||||
const groupEntry = new GroupEntry();
|
||||
groupEntry.name = GetUniqueString();
|
||||
groups.push(groupEntry);
|
||||
groupCount--;
|
||||
}
|
||||
return groups;
|
||||
}
|
||||
Reference in New Issue
Block a user