[SERVER-62735] Add unit test support for expected output in separate files Created: 18/Jan/22  Updated: 29/Oct/23  Resolved: 24/Feb/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Anna Wawrzyniak Assignee: Anna Wawrzyniak
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-62736 Add support for static resources incl... Closed
is depended on by SERVER-62596 Implement translation from Lookup QSN... Closed
is depended on by SERVER-63215 Add golden data tests for NLJ transla... Closed
Backwards Compatibility: Fully Compatible
Sprint: QE 2022-02-07, QE 2022-02-21, QE 2022-03-07, QE 2022-01-24
Participants:

 Description   

Extend the unit testing framework to allow test to compare results with expected results that are stored in separate files:

  • Instead of using ASSERT_EQ test should be allowed to write to ostream, and after completion the output will be compared against the known output from a resource file.
  • In case of difference, test should fail with the diff. Also a temp file with actual out put should be created to allow for investigation or bulk diffing.
  • Add tooling to update the expected output files based on actual result. Should support bulk update if all changes to expected results are desired.

 Depends on https://jira.mongodb.org/browse/SERVER-62736 to be able to allow inclusion of expected output files into the target binary, so that the contents can be used for comparison.



 Comments   
Comment by Githook User [ 23/Feb/22 ]

Author:

{'name': 'Anna Wawrzyniak', 'email': 'anna.wawrzyniak@mongodb.com', 'username': 'anna-wawrzyniak'}

Message: SERVER-62735 Add unit test support for expected output in separate files
Branch: master
https://github.com/mongodb/mongo/commit/170f9bb8f04670823a8502bac102d169c71c1d21

Generated at Thu Feb 08 05:55:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.