Closed kristofka closed 1 year ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
lib/spear/persistent_subscription/info.ex | 6 | 7 | 85.71% | ||
<!-- | Total: | 6 | 7 | 85.71% | --> |
Totals | |
---|---|
Change from base Build 4a77a76dd1078cdb1e2182a72ce7d7fc3f1d6e93: | -0.2% |
Covered Lines: | 648 |
Relevant Lines: | 649 |
This is looking good 😀
I think this just needs a test in test/spear_test.exs
(around L292 or within that describe
block):
@tag compatible(">= 22.10.0")
test "info about a psub can be fetched", c do
stream = c.stream_name
group = uuid_v4()
settings = %Spear.PersistentSubscription.Settings{}
assert Spear.create_persistent_subscription(c.conn, stream, group, settings) == :ok
assert {:ok, %Spear.PersistentSubscription.Info{event_source: ^stream, group_name: ^group}} =
Spear.get_persistent_subscription_info(c.conn, stream, group)
end
Thanks for the pointer regarding the tests. I've made the code more consistent with other persistent_subscription
functions and insured it worked well with the :all
stream. I've added a few tests as per your comment.
If you feel more work is needed, feel free to let me know.
Oops, had a couple of mistakes in the tests. Should be fixed. Sorry about that.
I'm not sure how I've broken two unrelated tests. Could it be the CI runner? I'm a bit lost here, sorry.
Oh hmm I think those two are a little flaky. Let me give them a restart
Reformatted spear.ex
- mix format is adament that case clauses should be separated by an empty line.
Should be fixed.
Thank you for your patience.
Looks good, thanks! I'll check out the other new RPCs and see if we can bundle all of the new ones into a new minor release
This is now released in v1.2.0 🎉
Thank you for your work and help. Much appreciated!
I've tried to abide by the coding standards. However, I'm not sure how and where to implement the tests.
Let me know how I can improve this request.