laskoviymishka commented on PR #527:
URL: https://github.com/apache/iceberg-go/pull/527#issuecomment-3194555815

   Besides the obvious problem with linting, such tests are harmful—you’re 
hiding a contract instead of exposing it.
   If you plan to bring value by explicitly checking a contract, it’s better to 
rework the test framework into more assert-style code.
   
   Right now the tests don’t really lock down the contract -- they mainly check 
`GetType()` against a custom `mockMetadata`. To make them meaningful:
   – build `Metadata` via the real builder/updates instead of a fake (which you 
named as mock)
   – cover each `Requirement` with clear positive/negative `Validate` cases (no 
table, plain procedural code)
   – use golden tests for serialization (fixed test-data) instead of ad-hoc 
checks
   – verify errors via `errors.Is` rather than string matching.
   
   This way the tests capture the contract rather than implementation details.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to