Open
Description
In our specs we use a test client to test if metrics were successfully written.
The test client is basically just an array with hashes. To simplify our specs we also have a custom rspec matcher expect_metric
.
The test client and matchers do distinguish between strings and symbols. For instance, in our implementation we set the default location to :raw
and in our specs we need to assert also with a symbol.
# works
expect_metric(tags: a_hash_including(location: :raw))
# fails
expect_metric(tags: a_hash_including(location: "raw"))
I think this is a little bit surprising and caused me some time to debug. As InfluxDB only supports JSON anyway, I propose to just store string hashes in our test client and assert strings in our specs.