diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2021-08-09 18:46:48 +0200 |
---|---|---|
committer | Vivien Kraus <vivien@planete-kraus.eu> | 2021-08-13 01:06:38 +0200 |
commit | ded10e28782f289ad3db15320bcf619ab4336876 (patch) | |
tree | 32609fd9f1eb0d2f8a23105e09f193827d16a275 /tests/too-many-refresh-tokens.scm | |
parent | 7b62790238902e10edb83c07286cf0643b097997 (diff) |
Switch to a more sensible error reporting system
Diffstat (limited to 'tests/too-many-refresh-tokens.scm')
-rw-r--r-- | tests/too-many-refresh-tokens.scm | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/tests/too-many-refresh-tokens.scm b/tests/too-many-refresh-tokens.scm index 3926da4..aacfbbd 100644 --- a/tests/too-many-refresh-tokens.scm +++ b/tests/too-many-refresh-tokens.scm @@ -1,4 +1,4 @@ -;; webid-oidc, implementation of the Solid specification +;; disfluid, implementation of the Solid specification ;; Copyright (C) 2020, 2021 Vivien Kraus ;; This program is free software: you can redistribute it and/or modify @@ -44,23 +44,25 @@ (second-refresh-token (vector-ref refresh-tokens 20))) (with-exception-handler (lambda (error) - (unless ((record-predicate &invalid-refresh-token) error) + (unless (invalid-refresh-token? error) (exit 1))) (lambda () - (with-refresh-token first-refresh-token key - (lambda (sub aud) - ;; It has been made invalid! - (exit 1)))) + (with-refresh-token + first-refresh-token key + (lambda (sub aud) + ;; It has been made invalid! + (exit 1)))) #:unwind? #t #:unwind-for-type &invalid-refresh-token) - (unless (with-refresh-token second-refresh-token key - (lambda (sub aud) - (format (current-error-port) - "~a / ~a\n" - (uri->string sub) - (uri->string aud)) - (unless (equal? sub (string->uri "https://subject-2.com")) - (exit 2)) - (unless (equal? aud (string->uri "https://client-2.com")) - (exit 3)))) + (unless (with-refresh-token + second-refresh-token key + (lambda (sub aud) + (format (current-error-port) + "~a / ~a\n" + (uri->string sub) + (uri->string aud)) + (unless (equal? sub (string->uri "https://subject-2.com")) + (exit 2)) + (unless (equal? aud (string->uri "https://client-2.com")) + (exit 3)))) (exit 4)))))) |