Skip to content

Commit 1e858f7

Browse files
committed
Clean up active/passive revocation tests
Amend tests to no longer assert an error message upon active revocation and to instead validate the success on either revocation variant, reflecting previous changes. In theory the "Passive" boolean seems removable as it does not add any functionality besides being logged, but it was found some instances of it are still needed to block active revocation for SSH certificates. Signed-off-by: Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
1 parent 3f437ad commit 1e858f7

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

api/revoke_test.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,18 @@ func TestRevokeRequestValidate(t *testing.T) {
4343
},
4444
err: &errs.Error{Err: errors.New("reasonCode out of bounds"), Status: http.StatusBadRequest},
4545
},
46-
"error/non-passive not implemented": {
46+
"ok/passive": {
4747
rr: &RevokeRequest{
4848
Serial: "10",
49-
ReasonCode: 8,
50-
Passive: false,
49+
ReasonCode: 9,
50+
Passive: true,
5151
},
52-
err: &errs.Error{Err: errors.New("non-passive revocation not implemented"), Status: http.StatusNotImplemented},
5352
},
54-
"ok": {
53+
"ok/active": {
5554
rr: &RevokeRequest{
5655
Serial: "10",
5756
ReasonCode: 9,
58-
Passive: true,
57+
Passive: false,
5958
},
6059
},
6160
}

0 commit comments

Comments
 (0)