From 3bcf91a5c209e2f5397a886c9fa43674ac09acee Mon Sep 17 00:00:00 2001 From: Yannick Clausen Date: Mon, 11 Nov 2024 21:46:26 +0100 Subject: [PATCH] add missing check --- loadtest/usecases/1_login.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/loadtest/usecases/1_login.ts b/loadtest/usecases/1_login.ts index 71e3986..27feca4 100644 --- a/loadtest/usecases/1_login.ts +++ b/loadtest/usecases/1_login.ts @@ -37,7 +37,8 @@ function main(): Result { const keycloakFormResponse = group("submit form", () => { const user = users.getLogin(); const result = loginPage.submitForm(loginPageResponse, user); - check(result.data!, { + if (!result.ok || !result.data) return result; + check(result.data, { "submitting login form to kc succeeded": (r) => r.status === 302, ...defaultTimingCheck, });