<#217 No spying behaviour for testing> Pull reques...
# flyte-github
a
#217 No spying behaviour for testing Pull request opened by honnix on <!date^1679657303^{date_short}|2023-03-24T11:28:23Z> TL;DR Remove the spying behaviour for workflow testing. Alternative to #214 Type ☑︎ Bug Fix ☐ Feature ☐ Plugin Are all requirements met? ☑︎ Code completed ☑︎ Smoke tested ☑︎ Unit tests added ☐ Code documentation added ☐ Any pending items have an associated Issue Complete description Mocking in workflow testing has been a spying behaviour, meaning if inputs don't match, we fall back to the real task execution if the task is not remote. This behaviour is rather a surprising to users because they would not expect real thing to be executed if they explicitly mock it. This changes the behaviour to the following: • If there is no mocking, and the task is not remote, we execute the real task • If there is no mocking, and the task is remote, we return default output (empty map, effectively
void
), so the workflow test may or may not fail depending on whether the output is used in the following tasks • If there is mocking and the inputs match, we return the mocked outputs • If there is mocking but the inputs don't match, we return default output (empty map, effectively
void
), so the workflow test may or may not fail depending on whether the output is used in the following tasks Tracking Issue flyteorg/flyte#3522 Follow-up issue NA flyteorg/flytekit-java GitHub Actions: build-snapshot 2 other checks have passed 2/3 successful checks