Problem
parseAssertionFlags handles boolean assertion flags two different ways:
--assert-ok uses cmd.Flags().Changed(...), so --assert-ok=false registers an assert-NOT-ok (AssertStatusNOK).
--assert-body-empty uses the value directly (if v, _ := ...GetBool(...); v), so --assert-body-empty=false registers nothing.
Reproduction
$ http-assert --assert-ok=false http://127.0.0.1:8791/500
[:] HTTP/1.1 500 Internal Server Error
[+] PASSED
[exit=0]
$ http-assert --assert-body-empty=false http://127.0.0.1:8791/ok
Error: Cannot perform request: no assertions defined
Why it matters
Two flags of the same shape do different things. Neither behaviour is documented.
Suggested fix
Make them consistent, and document the negation. The --assert-ok=false behaviour is genuinely useful — consider promoting it to a first-class --assert-not-ok flag, and adding --assert-body-not-empty.
Problem
parseAssertionFlagshandles boolean assertion flags two different ways:--assert-okusescmd.Flags().Changed(...), so--assert-ok=falseregisters an assert-NOT-ok (AssertStatusNOK).--assert-body-emptyuses the value directly (if v, _ := ...GetBool(...); v), so--assert-body-empty=falseregisters nothing.Reproduction
Why it matters
Two flags of the same shape do different things. Neither behaviour is documented.
Suggested fix
Make them consistent, and document the negation. The
--assert-ok=falsebehaviour is genuinely useful — consider promoting it to a first-class--assert-not-okflag, and adding--assert-body-not-empty.