Skip to content
GitLab
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
5a60e273
Commit
5a60e273
authored
Jan 10, 2020
by
Ivar Derksen
Committed by
Sietse Ringers
Feb 05, 2020
Browse files
Use defer for setting TestStorageDir back
parent
3d0e89b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
internal/sessiontest/legacy_test.go
View file @
5a60e273
...
...
@@ -9,6 +9,8 @@ import (
func
TestSessionUsingLegacyStorage
(
t
*
testing
.
T
)
{
test
.
SetTestStorageDir
(
"legacy_teststorage"
)
defer
test
.
SetTestStorageDir
(
"teststorage"
)
client
,
_
:=
parseStorage
(
t
)
// Issue new credential
...
...
@@ -22,6 +24,4 @@ func TestSessionUsingLegacyStorage(t *testing.T) {
require
.
NoError
(
t
,
err
)
id
:=
irma
.
NewAttributeTypeIdentifier
(
"irma-demo.MijnOverheid.root.BSN"
)
sessionHelper
(
t
,
getDisclosureRequest
(
id
),
"verification"
,
client
)
test
.
SetTestStorageDir
(
"teststorage"
)
}
irmaclient/irmaclient_legacy_test.go
View file @
5a60e273
...
...
@@ -7,6 +7,7 @@ import (
func
TestConvertingLegacyStorage
(
t
*
testing
.
T
)
{
test
.
SetTestStorageDir
(
"legacy_teststorage"
)
defer
test
.
SetTestStorageDir
(
"teststorage"
)
// Test all tests in this file with legacy storage too
t
.
Run
(
"TestVerify"
,
TestVerify
)
...
...
@@ -19,6 +20,4 @@ func TestConvertingLegacyStorage(t *testing.T) {
// TestFreshStorage is not needed, because this test does not use an existing storage
t
.
Run
(
"TestKeyshareEnrollmentRemoval"
,
TestKeyshareEnrollmentRemoval
)
t
.
Run
(
"TestUpdatePreferences"
,
TestUpdatePreferences
)
test
.
SetTestStorageDir
(
"teststorage"
)
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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