tvkitchen / countertop

The entry point for developers who want to set up a TV Kitchen.
https://tv.kitchen
GNU Lesser General Public License v3.0
6 stars 2 forks source link

Add Avro support #169

Closed slifty closed 2 years ago

slifty commented 2 years ago

This PR transfers the AvroPayload to Countertop, though it does so by extending the Payload functionality instead of creating a new class.

Related to #154

codecov[bot] commented 2 years ago

Codecov Report

Merging #169 (ac71d52) into main (04b01f7) will increase coverage by 0.42%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #169      +/-   ##
==========================================
+ Coverage   86.16%   86.59%   +0.42%     
==========================================
  Files          20       20              
  Lines         347      358      +11     
  Branches       56       57       +1     
==========================================
+ Hits          299      310      +11     
  Misses         46       46              
  Partials        2        2              
Impacted Files Coverage Δ
src/types/PayloadParameters.ts 100.00% <ø> (ø)
src/classes/Payload.ts 100.00% <100.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

slifty commented 2 years ago

Tests don't ever hit the case where the deserializer isn't a valid payload but. I don't actually think it's possible to hit that path because I'm pretty sure avsc will error if the buffer doesn't adhere to the type.

I'm going to add a test case to capture "what happens if you try to deserialize an invalid buffer" but even still I don't think that will reach that line. Nevertheless the line is necessary from a defensive perspective.