mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-04 08:56:50 +00:00
CI stack for Authentik with ldap
This commit is contained in:
@ -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