Add test for failed_returncode

When using kept_returncodes and or repaired_returncodes failure codes do not
properly default.

Reference: https://dev.cfengine.com/issues/5987