aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-07-04 11:10:50 +0200
committerAlex Auvolat <alex@adnab.me>2018-07-04 11:10:50 +0200
commitece5faa69da724ddfdee7b92016bac73dbdbff70 (patch)
tree49f4cda8a00b0c22b6dc6cc05e0f0af1f00515c5
parent66ab427e7ada3e8d9710eb79b1f768a8431b42eb (diff)
downloadshard-ece5faa69da724ddfdee7b92016bac73dbdbff70.tar.gz
shard-ece5faa69da724ddfdee7b92016bac73dbdbff70.zip
Tests
-rw-r--r--test/conn_test.exs4
-rw-r--r--test/mkllst_test.exs7
2 files changed, 4 insertions, 7 deletions
diff --git a/test/conn_test.exs b/test/conn_test.exs
index a8cda43..ff746b7 100644
--- a/test/conn_test.exs
+++ b/test/conn_test.exs
@@ -5,10 +5,6 @@ defmodule ShardTest.Conn do
require Salty.Box.Curve25519xchacha20poly1305, as: Box
require Salty.Sign.Ed25519, as: Sign
- test "the truth" do
- assert 1 + 1 == 2
- end
-
test "crypto connection" do
{:ok, srv_pkey, srv_skey} = Sign.keypair
{:ok, sess_pkey, sess_skey} = Box.keypair
diff --git a/test/mkllst_test.exs b/test/mkllst_test.exs
index 7d1fadf..4df25df 100644
--- a/test/mkllst_test.exs
+++ b/test/mkllst_test.exs
@@ -5,11 +5,12 @@ defmodule ShardTest.MklLst do
test "merkle list" do
{:ok, pid} = GenServer.start(SData.MerkleList, &SData.MerkleList.cmp_ts_str/2)
- {:ok, list, rt} = GenServer.call(pid, {:read, nil, nil})
- assert list == []
- assert rt == nil
+ {:ok, [], nil} = GenServer.call(pid, {:read, nil, nil})
GenServer.cast(pid, {:insert, {12, "aa, bb"}})
GenServer.cast(pid, {:insert_many, [{14, "qwerty"}, {8, "haha"}]})
+ GenServer.cast(pid, {:insert, {14, "qwerty"}})
+ {:ok, list, nil} = GenServer.call(pid, {:read, nil, nil})
+ assert length(list) == 3
end
end