fix(consent): Resolve test issues
@@ -356,7 +356,7 @@ func ManagerTests(m Manager, clientManager client.Manager, fositeManager x.Fosit
} {
t.Run("key="+tc.key, func(t *testing.T) {
c, h := MockAuthRequest(tc.key, tc.authAt)
- require.NoError(t, clientManager.CreateClient(context.TODO(), c.Client)) // Ignore errors that are caused by duplication
+ _ = clientManager.CreateClient(context.TODO(), c.Client) // Ignore errors that are caused by duplication
_, err := m.GetLoginRequest(context.TODO(), "challenge"+tc.key)
require.Error(t, err)
@@ -406,7 +406,7 @@ func ManagerTests(m Manager, clientManager client.Manager, fositeManager x.Fosit
} {
t.Run("key="+tc.key, func(t *testing.T) {
c, h := MockConsentRequest(tc.key, tc.remember, tc.rememberFor, tc.hasError, tc.skip, tc.authAt)
- require.NoError(t, clientManager.CreateClient(context.TODO(), c.Client)) // Ignore errors that are caused by duplication
+ _ = clientManager.CreateClient(context.TODO(), c.Client) // Ignore errors that are caused by duplication
_, err := m.GetConsentRequest(context.TODO(), "challenge"+tc.key)
require.Error(t, err)
@@ -514,8 +514,10 @@ func ManagerTests(m Manager, clientManager client.Manager, fositeManager x.Fosit
t.Run("case=revoke-used-consent-request", func(t *testing.T) {
cr1, hcr1 := MockConsentRequest("rv1", false, 0, false, false, false)
cr2, hcr2 := MockConsentRequest("rv2", false, 0, false, false, false)
- require.NoError(t, clientManager.CreateClient(context.TODO(), cr1.Client))
- require.NoError(t, clientManager.CreateClient(context.TODO(), cr2.Client))
+
+ // Ignore duplication errors
+ _ = clientManager.CreateClient(context.TODO(), cr1.Client)
+ _ = clientManager.CreateClient(context.TODO(), cr2.Client)
require.NoError(t, m.CreateConsentRequest(context.TODO(), cr1))
require.NoError(t, m.CreateConsentRequest(context.TODO(), cr2))
@@ -579,8 +581,10 @@ func ManagerTests(m Manager, clientManager client.Manager, fositeManager x.Fosit
t.Run("case=list-used-consent-requests", func(t *testing.T) {
cr1, hcr1 := MockConsentRequest("rv1", true, 0, false, false, false)
cr2, hcr2 := MockConsentRequest("rv2", false, 0, false, false, false)
- require.NoError(t, clientManager.CreateClient(context.TODO(), cr1.Client))
- require.NoError(t, clientManager.CreateClient(context.TODO(), cr2.Client))
+
+ // Ignore duplicate errors
+ _ = clientManager.CreateClient(context.TODO(), cr1.Client)
+ _ = clientManager.CreateClient(context.TODO(), cr2.Client)
require.NoError(t, m.CreateConsentRequest(context.TODO(), cr1))
require.NoError(t, m.CreateConsentRequest(context.TODO(), cr2))
