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
d245f8d2
Commit
d245f8d2
authored
Sep 27, 2019
by
Sietse Ringers
Browse files
test: fix new unit tests
parent
9ad6ec84
Pipeline
#30400
passed with stages
in 6 minutes and 54 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
internal/sessiontest/keyshare_test.go
View file @
d245f8d2
...
...
@@ -71,3 +71,18 @@ func keyshareSessions(t *testing.T, client *irmaclient.Client) {
sigRequest
.
AddSingle
(
irma
.
NewAttributeTypeIdentifier
(
"test.test.mijnirma.email"
),
nil
,
nil
)
sessionHelper
(
t
,
sigRequest
,
"signature"
,
client
)
}
func
TestIssuanceCombinedMultiSchemeSession
(
t
*
testing
.
T
)
{
id
:=
irma
.
NewAttributeTypeIdentifier
(
"test.test.mijnirma.email"
)
request
:=
getCombinedIssuanceRequest
(
id
)
sessionHelper
(
t
,
request
,
"issue"
,
nil
)
sessionHelper
(
t
,
irma
.
NewIssuanceRequest
([]
*
irma
.
CredentialRequest
{
{
CredentialTypeID
:
irma
.
NewCredentialTypeIdentifier
(
"test.test.email"
),
Attributes
:
map
[
string
]
string
{
"email"
:
"example@example.com"
,
},
},
},
irma
.
NewAttributeTypeIdentifier
(
"irma-demo.RU.studentCard.studentID"
)),
"issue"
,
nil
)
}
internal/sessiontest/session_test.go
View file @
d245f8d2
...
...
@@ -59,21 +59,6 @@ func TestIssuanceSession(t *testing.T) {
sessionHelper
(
t
,
request
,
"issue"
,
nil
)
}
func
TestIssuanceCombinedMultiSchemeSession
(
t
*
testing
.
T
)
{
id
:=
irma
.
NewAttributeTypeIdentifier
(
"test.test.mijnirma.email"
)
request
:=
getCombinedIssuanceRequest
(
id
)
sessionHelper
(
t
,
request
,
"issue"
,
nil
)
sessionHelper
(
t
,
irma
.
NewIssuanceRequest
([]
*
irma
.
CredentialRequest
{
{
CredentialTypeID
:
irma
.
NewCredentialTypeIdentifier
(
"test.test.email"
),
Attributes
:
map
[
string
]
string
{
"email"
:
"example@example.com"
,
},
},
},
irma
.
NewAttributeTypeIdentifier
(
"irma-demo.RU.studentCard.studentID"
)),
"issue"
,
nil
)
}
func
TestMultipleIssuanceSession
(
t
*
testing
.
T
)
{
request
:=
getMultipleIssuanceRequest
()
sessionHelper
(
t
,
request
,
"issue"
,
nil
)
...
...
@@ -425,7 +410,7 @@ func TestStaticQRSession(t *testing.T) {
// setup static QR and other variables
qr
:=
&
irma
.
Qr
{
Type
:
irma
.
ActionRedirect
,
URL
:
"http://localhost:48682/
session
/-/static/staticsession"
,
URL
:
"http://localhost:48682/
irma
/-/static/staticsession"
,
}
bts
,
err
:=
json
.
Marshal
(
qr
)
require
.
NoError
(
t
,
err
)
...
...
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