29 lines
731 B
Elixir
29 lines
731 B
Elixir
defmodule Bright.TrackerTest do
|
|
require Logger
|
|
use Bright.DataCase
|
|
|
|
alias Bright.Tracker
|
|
|
|
describe "tracker" do
|
|
use ExUnit.Case, async: false
|
|
|
|
# tails-amd64-6.10-img (BT info_hash v1)
|
|
@info_hash_v1_fixture "07b4516336e4afe9232c73bc312642590a7d7e95"
|
|
|
|
@tag :integration
|
|
test "accesslist_info_hash/1 using a string info_hash" do
|
|
case Tracker.accesslist_info_hash(@info_hash_v1_fixture) do
|
|
{:ok, info_hash} ->
|
|
assert :ok
|
|
assert info_hash === @info_hash_v1_fixture
|
|
|
|
{:error, :closed} ->
|
|
flunk("The connection to tracker was closed. Is tracker running?")
|
|
|
|
other ->
|
|
flunk("Unexpected result: #{inspect(other)}")
|
|
end
|
|
end
|
|
end
|
|
end
|