Show a dynamically updated list of NTS servers #1
|
@ -28,8 +28,8 @@ defmodule Chronoscope.GeminiTest do
|
|||
|> expect(:which_children, fn _ -> [{1, 2, 3, 4}, {5, 6, 7, 8}] end)
|
||||
|
||||
GenServerMock
|
||||
|> expect(:call, fn 2, :list -> :one end)
|
||||
|> expect(:call, fn 6, :list -> :two end)
|
||||
|> expect(:call, fn 2, :list, 10_000 -> :one end)
|
||||
|> expect(:call, fn 6, :list, 10_000 -> :two end)
|
||||
|
||||
assert Gemini.list() == [:one, :two]
|
||||
end
|
||||
|
@ -48,7 +48,7 @@ defmodule Chronoscope.GeminiTest do
|
|||
|> expect(:lookup, fn _, _ -> [{1, 2}] end)
|
||||
|
||||
GenServerMock
|
||||
|> expect(:call, fn 1, :terminate -> :terminating end)
|
||||
|> expect(:call, fn 1, :terminate, 10_000 -> :terminating end)
|
||||
|
||||
assert Gemini.remove("localhost", 1965, "/") == {:ok, :terminating}
|
||||
end
|
||||
|
@ -73,7 +73,7 @@ defmodule Chronoscope.GeminiTest do
|
|||
)
|
||||
|
||||
GenServerMock
|
||||
|> expect(:call, fn 1, :connect -> :result end)
|
||||
|> expect(:call, fn 1, :connect, 10_000 -> :result end)
|
||||
|
||||
assert Gemini.connect("localhost", 1965, "/") == :result
|
||||
end
|
||||
|
@ -83,7 +83,7 @@ defmodule Chronoscope.GeminiTest do
|
|||
|> expect(:lookup, fn _, _ -> [{1, 2}] end)
|
||||
|
||||
GenServerMock
|
||||
|> expect(:call, fn 1, :connect -> :result end)
|
||||
|> expect(:call, fn 1, :connect, 10_000 -> :result end)
|
||||
|
||||
assert Gemini.connect("localhost", 1965, "/") == :result
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ defmodule Chronoscope.NTS.KeyEstablishmentClientTest do
|
|||
|
||||
setup :verify_on_exit!
|
||||
|
||||
@timeout 3000
|
||||
@timeout 3500
|
||||
|
||||
describe "Chronoscope.NTS.KeyEstablishmentClient.key_establishment()" do
|
||||
test "sends the correct TLS options" do
|
||||
|
|
|
@ -60,8 +60,8 @@ defmodule Chronoscope.NTSTest do
|
|||
)
|
||||
|
||||
GenServerMock
|
||||
|> expect(:call, fn 1, :list -> :one end)
|
||||
|> expect(:call, fn 2, :list -> :two end)
|
||||
|> expect(:call, fn 1, :list, 10_000 -> :one end)
|
||||
|> expect(:call, fn 2, :list, 10_000 -> :two end)
|
||||
|
||||
assert NTS.list_clients([%{host: "test", port: 1}, %{host: "test2", port: 2}]) == [:one, :two]
|
||||
end
|
||||
|
@ -80,7 +80,7 @@ defmodule Chronoscope.NTSTest do
|
|||
|> expect(:lookup, fn _, _ -> [{1, 2}] end)
|
||||
|
||||
GenServerMock
|
||||
|> expect(:call, fn 1, :terminate -> :terminating end)
|
||||
|> expect(:call, fn 1, :terminate, 10_000 -> :terminating end)
|
||||
|
||||
assert NTS.remove("localhost", 1111) == {:ok, :terminating}
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue