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
3f98c45d
Commit
3f98c45d
authored
Mar 03, 2020
by
Leon
Committed by
Sietse Ringers
Mar 03, 2020
Browse files
fix: new test storage has 1 log standard, print more detailed test failure
parent
3c89405f
Changes
1
Hide whitespace changes
Inline
Side-by-side
irmaclient/irmaclient_test.go
View file @
3f98c45d
...
...
@@ -3,6 +3,7 @@ package irmaclient
import
(
"encoding/json"
"errors"
"fmt"
"os"
"path/filepath"
"testing"
...
...
@@ -366,20 +367,20 @@ func TestRemoveStorage(t *testing.T) {
client
:=
parseStorage
(
t
)
defer
test
.
ClearTestStorage
(
t
)
bucketsBefore
:=
map
[
string
]
bool
{
"attrs"
:
true
,
"sigs"
:
true
,
"userdata"
:
true
,
"logs"
:
fals
e
}
// Test storage has
no
log
s
bucketsBefore
:=
map
[
string
]
bool
{
"attrs"
:
true
,
"sigs"
:
true
,
"userdata"
:
true
,
"logs"
:
tru
e
}
// Test storage has
1
log
bucketsAfter
:=
map
[
string
]
bool
{
"attrs"
:
false
,
"sigs"
:
false
,
"userdata"
:
true
,
"logs"
:
false
}
// Userdata should hold a new secret key
old_sk
:=
*
client
.
secretkey
// Check that buckets exist
for
name
,
exists
:=
range
bucketsBefore
{
require
.
Equal
(
t
,
exists
,
client
.
storage
.
BucketExists
([]
byte
(
name
)))
require
.
Equal
(
t
,
exists
,
client
.
storage
.
BucketExists
([]
byte
(
name
))
,
fmt
.
Sprintf
(
"Bucket
\"
%s
\"
exists should be %t"
,
name
,
exists
)
)
}
require
.
NoError
(
t
,
client
.
RemoveStorage
())
for
name
,
exists
:=
range
bucketsAfter
{
require
.
Equal
(
t
,
exists
,
client
.
storage
.
BucketExists
([]
byte
(
name
)))
require
.
Equal
(
t
,
exists
,
client
.
storage
.
BucketExists
([]
byte
(
name
))
,
fmt
.
Sprintf
(
"Bucket
\"
%s
\"
exists should be %t"
,
name
,
exists
)
)
}
// Check that the client has a new secret key
...
...
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