fix: WebAuthN (registration / login) and list on users (#4290)

* fix: WebAuthN when running under non default port

* fix: remove notification schema from list of views / failed events

* fix: auth method column type in user auth methods
This commit is contained in:
Livio Spring
2022-09-01 09:10:07 +02:00
committed by GitHub
parent b79670ea96
commit 32b751a3a0
5 changed files with 52 additions and 52 deletions

View File

@@ -27,17 +27,17 @@ func Test_UserAuthMethodPrepares(t *testing.T) {
prepare: prepareUserAuthMethodsQuery,
want: want{
sqlExpectations: mockQueries(
regexp.QuoteMeta(`SELECT projections.user_auth_methods2.token_id,`+
` projections.user_auth_methods2.creation_date,`+
` projections.user_auth_methods2.change_date,`+
` projections.user_auth_methods2.resource_owner,`+
` projections.user_auth_methods2.user_id,`+
` projections.user_auth_methods2.sequence,`+
` projections.user_auth_methods2.name,`+
` projections.user_auth_methods2.state,`+
` projections.user_auth_methods2.method_type,`+
regexp.QuoteMeta(`SELECT projections.user_auth_methods3.token_id,`+
` projections.user_auth_methods3.creation_date,`+
` projections.user_auth_methods3.change_date,`+
` projections.user_auth_methods3.resource_owner,`+
` projections.user_auth_methods3.user_id,`+
` projections.user_auth_methods3.sequence,`+
` projections.user_auth_methods3.name,`+
` projections.user_auth_methods3.state,`+
` projections.user_auth_methods3.method_type,`+
` COUNT(*) OVER ()`+
` FROM projections.user_auth_methods2`),
` FROM projections.user_auth_methods3`),
nil,
nil,
),
@@ -49,17 +49,17 @@ func Test_UserAuthMethodPrepares(t *testing.T) {
prepare: prepareUserAuthMethodsQuery,
want: want{
sqlExpectations: mockQueries(
regexp.QuoteMeta(`SELECT projections.user_auth_methods2.token_id,`+
` projections.user_auth_methods2.creation_date,`+
` projections.user_auth_methods2.change_date,`+
` projections.user_auth_methods2.resource_owner,`+
` projections.user_auth_methods2.user_id,`+
` projections.user_auth_methods2.sequence,`+
` projections.user_auth_methods2.name,`+
` projections.user_auth_methods2.state,`+
` projections.user_auth_methods2.method_type,`+
regexp.QuoteMeta(`SELECT projections.user_auth_methods3.token_id,`+
` projections.user_auth_methods3.creation_date,`+
` projections.user_auth_methods3.change_date,`+
` projections.user_auth_methods3.resource_owner,`+
` projections.user_auth_methods3.user_id,`+
` projections.user_auth_methods3.sequence,`+
` projections.user_auth_methods3.name,`+
` projections.user_auth_methods3.state,`+
` projections.user_auth_methods3.method_type,`+
` COUNT(*) OVER ()`+
` FROM projections.user_auth_methods2`),
` FROM projections.user_auth_methods3`),
[]string{
"token_id",
"creation_date",
@@ -111,17 +111,17 @@ func Test_UserAuthMethodPrepares(t *testing.T) {
prepare: prepareUserAuthMethodsQuery,
want: want{
sqlExpectations: mockQueries(
regexp.QuoteMeta(`SELECT projections.user_auth_methods2.token_id,`+
` projections.user_auth_methods2.creation_date,`+
` projections.user_auth_methods2.change_date,`+
` projections.user_auth_methods2.resource_owner,`+
` projections.user_auth_methods2.user_id,`+
` projections.user_auth_methods2.sequence,`+
` projections.user_auth_methods2.name,`+
` projections.user_auth_methods2.state,`+
` projections.user_auth_methods2.method_type,`+
regexp.QuoteMeta(`SELECT projections.user_auth_methods3.token_id,`+
` projections.user_auth_methods3.creation_date,`+
` projections.user_auth_methods3.change_date,`+
` projections.user_auth_methods3.resource_owner,`+
` projections.user_auth_methods3.user_id,`+
` projections.user_auth_methods3.sequence,`+
` projections.user_auth_methods3.name,`+
` projections.user_auth_methods3.state,`+
` projections.user_auth_methods3.method_type,`+
` COUNT(*) OVER ()`+
` FROM projections.user_auth_methods2`),
` FROM projections.user_auth_methods3`),
[]string{
"token_id",
"creation_date",
@@ -195,17 +195,17 @@ func Test_UserAuthMethodPrepares(t *testing.T) {
prepare: prepareUserAuthMethodsQuery,
want: want{
sqlExpectations: mockQueryErr(
regexp.QuoteMeta(`SELECT projections.user_auth_methods2.token_id,`+
` projections.user_auth_methods2.creation_date,`+
` projections.user_auth_methods2.change_date,`+
` projections.user_auth_methods2.resource_owner,`+
` projections.user_auth_methods2.user_id,`+
` projections.user_auth_methods2.sequence,`+
` projections.user_auth_methods2.name,`+
` projections.user_auth_methods2.state,`+
` projections.user_auth_methods2.method_type,`+
regexp.QuoteMeta(`SELECT projections.user_auth_methods3.token_id,`+
` projections.user_auth_methods3.creation_date,`+
` projections.user_auth_methods3.change_date,`+
` projections.user_auth_methods3.resource_owner,`+
` projections.user_auth_methods3.user_id,`+
` projections.user_auth_methods3.sequence,`+
` projections.user_auth_methods3.name,`+
` projections.user_auth_methods3.state,`+
` projections.user_auth_methods3.method_type,`+
` COUNT(*) OVER ()`+
` FROM projections.user_auth_methods2`),
` FROM projections.user_auth_methods3`),
sql.ErrConnDone,
),
err: func(err error) (error, bool) {