Commit fdbae9b6 authored by Ivar Derksen's avatar Ivar Derksen Committed by Sietse Ringers

Added test to check whether logs are stored

parent 4a8781c7
......@@ -25,6 +25,13 @@ func TestLogging(t *testing.T) {
require.NoError(t, err)
require.True(t, len(logs) == oldLogLength+1)
// Check whether newly issued credential is actually stored
require.Nil(t, client.Close())
client, _ = parseExistingStorage(t)
logs, err = client.LoadNewestLogs(100)
require.NoError(t, err)
require.True(t, len(logs) == oldLogLength+1)
entry := logs[0]
require.NotNil(t, entry)
require.NoError(t, err)
......@@ -42,6 +49,13 @@ func TestLogging(t *testing.T) {
require.NoError(t, err)
require.True(t, len(logs) == oldLogLength+2)
// Check whether log entry for disclosing session is actually stored
require.Nil(t, client.Close())
client, _ = parseExistingStorage(t)
logs, err = client.LoadNewestLogs(100)
require.NoError(t, err)
require.True(t, len(logs) == oldLogLength+2)
entry = logs[0]
require.NotNil(t, entry)
require.NoError(t, err)
......@@ -66,6 +80,14 @@ func TestLogging(t *testing.T) {
logs, err = client.LoadNewestLogs(100)
require.NoError(t, err)
require.True(t, len(logs) == oldLogLength+3)
// Check whether log entry for signature session is actually stored
require.Nil(t, client.Close())
client, _ = parseExistingStorage(t)
logs, err = client.LoadNewestLogs(100)
require.NoError(t, err)
require.True(t, len(logs) == oldLogLength+3)
entry = logs[0]
require.NotNil(t, entry)
require.NoError(t, err)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment