Skip to content

Commit

Permalink
add befristung
Browse files Browse the repository at this point in the history
  • Loading branch information
clauyan committed Nov 13, 2024
1 parent d448a51 commit e2cf857
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions loadtest/usecases/2_create-delete-new-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
postPersonenkontextWorkflow,
} from "../util/api.ts";
import { getDefaultOptions } from "../util/config.ts";
import { getRandomName, pickRandomItem } from "../util/data.ts";
import { getFutureDate, getRandomName, pickRandomItem } from "../util/data.ts";
import { goToUserList, login } from "../util/page.ts";
import { deleteAllTestUsers } from "../util/resource-helper.ts";
import { wrapTestFunction } from "../util/usecase-wrapper.ts";
Expand Down Expand Up @@ -67,7 +67,7 @@ function main(users = getDefaultAdminMix()) {
const body = {
...getRandomName(),
personalnummer: "",
befristung: new Date("2055-07-31T22:00:00.000Z"),
befristung: getFutureDate(),
createPersonenkontexte: [
{
organisationId: organisation.id,
Expand Down
3 changes: 2 additions & 1 deletion loadtest/util/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
getStatusChecker,
} from "./checks.ts";
import { getBackendUrl } from "./config.ts";
import { NAME_PREFIX } from "./data.ts";
import { getFutureDate, NAME_PREFIX } from "./data.ts";
import { prettyLog } from "./debug.ts";

const backendUrl = getBackendUrl();
Expand Down Expand Up @@ -327,6 +327,7 @@ export function putPersonLock(personId: string, lock: boolean) {
lock,
//@ts-expect-error openapi generator converts this to camelcase
locked_by: NAME_PREFIX,
locked_until: getFutureDate(),
};
const params = {
headers: { "Content-Type": "application/json" },
Expand Down
4 changes: 4 additions & 0 deletions loadtest/util/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ export function getRandomName(): {
vorname: s,
};
}

export function getFutureDate() {
return new Date("2055-07-31T22:00:00.000Z");
}

0 comments on commit e2cf857

Please sign in to comment.