From ef926b8b5551dcd95f50ebccda2967fc373b255c Mon Sep 17 00:00:00 2001 From: Kurt Roeckx Date: Wed, 21 Jul 2021 22:12:17 +0200 Subject: [PATCH 1/2] If authentication failed, no steps completed Signed-off-by: Kurt Roeckx --- tests/14account/02deactivate.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/14account/02deactivate.pl b/tests/14account/02deactivate.pl index 20b03d6be..d0e806b9e 100644 --- a/tests/14account/02deactivate.pl +++ b/tests/14account/02deactivate.pl @@ -43,13 +43,15 @@ sub matrix_deactivate_account my $body = decode_json $resp->content; - assert_json_keys( $body, qw( error errcode params completed flows )); + assert_json_keys( $body, qw( error errcode params flows )); my $errcode = $body->{errcode}; $errcode eq "M_FORBIDDEN" or die "Expected errcode to be M_FORBIDDEN but was $errcode"; + exists $body->{completed} and die "Got an unexpected a 'completed' key"; + Future->done(1); }); }; From 147a77e5a42371711714184175920b8ea47ba784 Mon Sep 17 00:00:00 2001 From: Kurt Roeckx Date: Fri, 23 Jul 2021 20:45:15 +0200 Subject: [PATCH 2/2] fixup! If authentication failed, no steps completed Signed-off-by: Kurt Roeckx --- tests/14account/02deactivate.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/14account/02deactivate.pl b/tests/14account/02deactivate.pl index d0e806b9e..9415590cc 100644 --- a/tests/14account/02deactivate.pl +++ b/tests/14account/02deactivate.pl @@ -50,7 +50,7 @@ sub matrix_deactivate_account $errcode eq "M_FORBIDDEN" or die "Expected errcode to be M_FORBIDDEN but was $errcode"; - exists $body->{completed} and die "Got an unexpected a 'completed' key"; + exists $body->{completed} and die "Got an unexpected 'completed' key"; Future->done(1); });