guardian / flexible-octopus-converter

An AWS Lambda for converting JSON from Octopus into Thrift.
1 stars 0 forks source link

Fix missing mapping key in OctopusArticle #7

Closed jennygrahamjones closed 4 years ago

jennygrahamjones commented 4 years ago

What does this change?

Adds the "p" for print value to the mappings used to convert an OctopusArticle into a Thrift Article.

Without this, the bundle would fail validation due to java.util.NoSuchElementException: key not found: p 🤦

Previously, this was not an issue because we ignored articles marked for print publication.

How can we measure success?

Articles marked as for print should not be sent to the dead letter queue.

jennygrahamjones commented 4 years ago

Is there a way to test for this, or is that a bit redundant?

Not redundant at all! I've added a test assertion.

jennygrahamjones commented 4 years ago

LGTM. It would useful to get the CI setup so we can see if the build is passing on the PR.

I've just set that up on TeamCity 👍