Commit 5a60e273 authored by Ivar Derksen's avatar Ivar Derksen Committed by Sietse Ringers

Use defer for setting TestStorageDir back

parent 3d0e89b7
......@@ -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")
}
......@@ -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")
}
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