Open neongreen opened 5 years ago
While it would be possible to test this, I'd argue there is not much point in this because the test would hold vacuously. We have this guarantee from Haskell's type checker. This is the definition of the descriptor:
and this is its FromJSON
instance:
In other words, key
has to be there, otherwise we get an exception like this:
2019-11-27T16:39:31Z, E, error loading new configuration from runtime: "nix/ratelimit/ratelimit/config/another.yaml", Aeson exception:
Error in $.descriptors[0].key: parsing Text failed, expected String, but encountered Null
@neongreen: Can I close this issue?
https://github.com/lyft/ratelimit/blob/master/test/config/config_test.go#L185-L194