Commit 4b4a4d92 authored by Sietse Ringers's avatar Sietse Ringers Committed by Sietse Ringers

test: don't test permission configuration against invalid configurations

parent f1c810b3
......@@ -104,32 +104,6 @@ func TestCanIssue(t *testing.T) {
require.Empty(t, message)
})
t.Run("allowed credential request issuer wildcard with attribute name", func(t *testing.T) {
var conf Configuration
require.NoError(t, json.Unmarshal([]byte(confJSON), &conf))
conf.Requestors["myapp"].Issuing[0] = "irma-demo.*.ageLower"
credentialRequest := createCredentialRequest("irma-demo.MijnOverheid.ageLower", map[string]string{"over12": "yes"})
result, message := conf.CanIssue("myapp", credentialRequest)
require.False(t, result)
require.Equal(t, "irma-demo.MijnOverheid.ageLower", message)
})
t.Run("allowed credential request wrong issuer wildcard", func(t *testing.T) {
var conf Configuration
require.NoError(t, json.Unmarshal([]byte(confJSON), &conf))
conf.Requestors["myapp"].Issuing[0] = "irma-demo.**"
credentialRequest := createCredentialRequest("irma-demo.MijnOverheid.ageLower", map[string]string{"over12": "yes"})
result, message := conf.CanIssue("myapp", credentialRequest)
require.False(t, result)
require.Equal(t, "irma-demo.MijnOverheid.ageLower", message)
})
t.Run("allowed credential request single wildcard", func(t *testing.T) {
var conf Configuration
require.NoError(t, json.Unmarshal([]byte(confJSON), &conf))
......@@ -227,14 +201,6 @@ func TestCanVerifyOrSign(t *testing.T) {
true,
"",
},
{
"allowed disclosing request incorrect attribute value wildcard",
"irma-demo.MijnOverheid.ageLower.over18",
"irma-demo.MijnOverheid.ageLower.**",
"myapp",
false,
"irma-demo.MijnOverheid.ageLower.over18",
},
}
for _, action := range []string{"disclosing"} {
......
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