Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
fdbae9b6
Commit
fdbae9b6
authored
Jan 28, 2020
by
Ivar Derksen
Committed by
Sietse Ringers
Feb 05, 2020
Browse files
Added test to check whether logs are stored
parent
4a8781c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
internal/sessiontest/logs_test.go
View file @
fdbae9b6
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment