nasa / CF

The Core Flight System (cFS) CFDP application.
Apache License 2.0
86 stars 46 forks source link

Remove unit test context_t elements as overkill for a coverage test #264

Open skliper opened 2 years ago

skliper commented 2 years ago

Checklist (Please check before submitting)

Is your feature request related to a problem? Please describe. There's a significant amount of unit test logic dedicated to confirming argument inputs to stub functions that go above and beyond the requirements of a coverage test. This logic is associated with defining and saving *_context_t structures from within stubs. While there is technically nothing wrong with these tests (they all pass), the issue is with technical debt. Unless the test is verifying requirements/spec/algorithm document there's also the question of what is truth.

Describe the solution you'd like Use functional tests to verify function. Remove context checks that don't add value in the coverage test context.

Describe alternatives you've considered Leave as is, but whenever maintenance is performed encourage simplification. At minimum we should avoid this pattern in new or updated tests.

Additional context Along the same lines as removing the randomness, these aren't intended to be fuzz tests.

Requester Info Jacob Hageman - NASA/GSFC