Skip to content

Commit

Permalink
Fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Nov 2, 2022
1 parent 509308d commit 352bc5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/spear.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1678,8 +1678,8 @@ defmodule Spear do
@doc api: :operations
@spec merge_indexes(connection :: Spear.Connection.t(), opts :: Keyword.t()) ::
:ok | {:error, any()}
# coveralls-ignore-start
def merge_indexes(conn, opts \\ []) do
# coveralls-ignore-start
with {:ok, empty()} <- request(conn, Operations, :MergeIndexes, [empty()], opts) do
:ok
end
Expand Down Expand Up @@ -1710,7 +1710,6 @@ defmodule Spear do
@spec resign_node(connection :: Spear.Connection.t(), opts :: Keyword.t()) ::
:ok | {:error, any()}
def resign_node(conn, opts \\ []) do
# coveralls-ignore-start
with {:ok, empty()} <- request(conn, Operations, :ResignNode, [empty()], opts) do
:ok
end
Expand Down Expand Up @@ -1743,7 +1742,6 @@ defmodule Spear do
priority :: integer(),
opts :: Keyword.t()
) :: :ok | {:error, any()}
# coveralls-ignore-start
def set_node_priority(conn, priority, opts \\ [])

def set_node_priority(conn, priority, opts) when is_integer(priority) do
Expand Down Expand Up @@ -1775,13 +1773,14 @@ defmodule Spear do
@spec restart_persistent_subscriptions(connection :: Spear.Connection.t(), opts :: Keyword.t()) ::
:ok | {:error, any()}
def restart_persistent_subscriptions(conn, opts \\ []) do
# coveralls-ignore-start
with {:ok, empty()} <-
request(conn, Operations, :RestartPersistentSubscriptions, [empty()], opts) do
:ok
end
end

# coveralls-ignore-stop

@doc """
Reads the cluster information from the connected EventStoreDB
Expand Down Expand Up @@ -2525,9 +2524,12 @@ defmodule Spear do
when (is_binary(stream_name) or stream_name == :all) and is_binary(group_name) do
stop_at_option =
case Keyword.fetch(opts, :stop_at) do
# coveralls-ignore-start
{:ok, stop_at} when is_integer(stop_at) ->
{:stop_at, stop_at}

# coveralls-ignore-stop

:error ->
{:no_limit, Shared.empty()}
end
Expand Down
3 changes: 3 additions & 0 deletions lib/spear/persistent_subscription/info.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ defmodule Spear.PersistentSubscription.Info do
defstruct [:key, :value]

@doc false
# coveralls-ignore-start
def from_proto(
Persistent.subscription_info_measurement(
key: key,
Expand All @@ -37,6 +38,8 @@ defmodule Spear.PersistentSubscription.Info do
) do
%__MODULE__{key: key, value: value}
end

# coveralls-ignore-stop
end

alias __MODULE__.Measurement
Expand Down

0 comments on commit 352bc5f

Please sign in to comment.