mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-04 00:46:50 +00:00
CI stack for Authentik with ldap
This commit is contained in:
@ -18,4 +18,4 @@ threshold:
|
||||
# package: 30
|
||||
# (optional; default 0)
|
||||
# The minimum total coverage project should have
|
||||
total: 34
|
||||
total: 33
|
||||
|
@ -24,7 +24,7 @@
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"pattern": "^password$"
|
||||
"pattern": "^(local|ldap|oidc)$"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"pattern": "^password$"
|
||||
"pattern": "^(local|ldap|oidc)$"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -125,14 +125,12 @@ INSERT INTO `user` (
|
||||
`created_at`,
|
||||
`updated_at`,
|
||||
`name`,
|
||||
`nickname`,
|
||||
`email`,
|
||||
`is_system`
|
||||
) VALUES (
|
||||
ROUND(UNIX_TIMESTAMP(CURTIME(4)) * 1000),
|
||||
ROUND(UNIX_TIMESTAMP(CURTIME(4)) * 1000),
|
||||
"System",
|
||||
"System",
|
||||
"system@localhost",
|
||||
TRUE
|
||||
);
|
||||
|
@ -125,14 +125,12 @@ INSERT INTO "user" (
|
||||
"created_at",
|
||||
"updated_at",
|
||||
"name",
|
||||
"nickname",
|
||||
"email",
|
||||
"is_system"
|
||||
) VALUES (
|
||||
EXTRACT(EPOCH FROM TIMESTAMP '2011-05-17 10:40:28.876944') * 1000,
|
||||
EXTRACT(EPOCH FROM TIMESTAMP '2011-05-17 10:40:28.876944') * 1000,
|
||||
'System',
|
||||
'System',
|
||||
'system@localhost',
|
||||
TRUE
|
||||
);
|
||||
|
@ -124,14 +124,12 @@ INSERT INTO `user` (
|
||||
created_at,
|
||||
updated_at,
|
||||
name,
|
||||
nickname,
|
||||
email,
|
||||
is_system
|
||||
) VALUES (
|
||||
unixepoch() * 1000,
|
||||
unixepoch() * 1000,
|
||||
"System",
|
||||
"System",
|
||||
"system@localhost",
|
||||
1
|
||||
);
|
||||
|
@ -97,13 +97,14 @@ func (s *testsuite) TestSave() {
|
||||
defer goleak.VerifyNone(s.T(), goleak.IgnoreAnyFunction("database/sql.(*DB).connectionOpener"))
|
||||
|
||||
s.mock.ExpectBegin()
|
||||
s.mock.ExpectQuery(regexp.QuoteMeta(`INSERT INTO "auth" ("created_at","updated_at","is_deleted","user_id","type","secret") VALUES ($1,$2,$3,$4,$5,$6) RETURNING "id"`)).
|
||||
s.mock.ExpectQuery(regexp.QuoteMeta(`INSERT INTO "auth" ("created_at","updated_at","is_deleted","user_id","type","identity","secret") VALUES ($1,$2,$3,$4,$5,$6,$7) RETURNING "id"`)).
|
||||
WithArgs(
|
||||
sqlmock.AnyArg(),
|
||||
sqlmock.AnyArg(),
|
||||
0,
|
||||
100,
|
||||
TypeLocal,
|
||||
"",
|
||||
"abc123",
|
||||
).
|
||||
WillReturnRows(sqlmock.NewRows([]string{"id"}).AddRow("11"))
|
||||
|
@ -39,7 +39,6 @@ func (m *Model) LoadByID(id int) error {
|
||||
// Save will save this model to the DB
|
||||
func (m *Model) Save() error {
|
||||
db := database.GetDB()
|
||||
// todo: touch? not sure that save does this or not?
|
||||
result := db.Save(m)
|
||||
return result.Error
|
||||
}
|
||||
|
@ -84,7 +84,6 @@ func (s *testsuite) SetupTest() {
|
||||
).AddRow(
|
||||
11,
|
||||
"Jane Doe",
|
||||
"Jane",
|
||||
"jane@example.com",
|
||||
true,
|
||||
false,
|
||||
@ -183,7 +182,6 @@ func (s *testsuite) TestSave() {
|
||||
sqlmock.AnyArg(),
|
||||
0,
|
||||
"John Doe",
|
||||
"Jonny",
|
||||
"sarah@example.com",
|
||||
false,
|
||||
false,
|
||||
|
Reference in New Issue
Block a user