Node set Failed Testing, but custom script succeeded.

I ran a custom test script on a bare-metal node. The script finished with exit code 0 and was marked as passed, but the node itself is still reported as Failed Testing. Only one test was executed.

Expected Result:
The node should be marked as passed if all executed tests return exit code 0.

Actual Result:
Despite the test passing, the node is reported as Failed Testing.

Anyone know what might causing this to marked as Failed Testing