NASA-PDS / harvest

Standalone Harvest client application providing the functionality for capturing and indexing product metadata into the PDS Registry system (https://github.com/nasa-pds/registry).
https://nasa-pds.github.io/registry
Other
4 stars 3 forks source link

Fixed truncation of trailing zeros in LIDVID #91

Closed tdddblog closed 2 years ago

tdddblog commented 2 years ago

🗒️ Summary

Fixed _id and lidvid field generator to not truncate trailing zeros of a version id.

⚙️ Test Data and/or Report

NOTE: Build commons project first. See https://github.com/NASA-PDS/registry-common/pull/25

  1. Create a label with the version_id field containing trailing zeros, for example, 1.10
  2. Run Harvest to Ingest the label.
  3. Check the lidvid and _id fields in OpenSearch / Elasticsearch.

♻️ Related Issues

resolves https://github.com/NASA-PDS/harvest/issues/90

jordanpadams commented 2 years ago

@tdddblog is there some sort of unit test that could be created to test for this bug?

tloubrieu-jpl commented 2 years ago

@jordanpadams @tdddblog this is not a unit test but we coud check that the test data loaded in the integration test has still their trailing 0s in the API

tloubrieu-jpl commented 2 years ago

My intention was that the developer is in charge of developing further these integration tests when new features are added or bug fixed.

jordanpadams commented 2 years ago

I will merge this as-is right now, but we definitely should talk in the future about improving our code coverage. especially when bugs like this pop up