TestHarness expectedOutput and expectedLoggedValues should not be interchangeable
Summary
TestHarness uses same object for log and function output, which can produce unexpected results.
Steps to reproduce
- In the Nuix Connector, run one of the following tests:
- Reductech.EDR.Connectors.Nuix.Tests.Steps.NuixRunScriptTests.TestScriptWithStream_Integration
- Reductech.EDR.Connectors.Nuix.Tests.Steps.NuixRunScriptTests.TestScriptWithNoStream_Integration
- Swap the
expectedOutput
and any of theexpectedLoggedValues
params ofIntegrationTestCase
See: https://gitlab.com/reductech/edr/connectors/nuix/-/jobs/902545792
Current Behavior
The tests pass even if expectedOutput
is passed in as an expectedLoggedValues
Expected Behaviour
The test should fail.
Logs and Screenshots
Should fail, but works:
var stepCase = new IntegrationTestCase("Case without stream",
new NuixRunScript
{
FunctionName = Constant("test_Script"),
ScriptText = Constant("log param1\r\nreturn param2"),
EntityStreamParameter = null,
Parameters = new Constant<Entity>(CreateEntity(("param1", "ABC"), ("param2", "DEF")))
},
"Starting",
"ABC",
"DEF",
"Finished"
).WithSettings(Constants.NuixSettingsList.OrderByDescending(x => x.NuixVersion).First());
Edited by antonyoni