refac: stale test entries, failing web tests, Postgre backup bug, Hardcoded MySQL table count, Stale Postgre connection in test, own-scope visibility filter, GetAll ignoring its error, JSON tags in use-case types, 31 copies of DESKTOP_QUERY, ProfileView endpoint paths
This commit is contained in:
1 parent
efecdee200
commit
5d6f378fce
87 files changed
+696
-373
No files matched your search
@@ -59,8 +59,9 @@ func TestMySQLMigration(t *testing.T) {
|
||||
}
|
||||
}
|
||||
binaryTables := columnCount(t, db, "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_collation = 'utf8mb4_bin'")
|
||||
if binaryTables != 6 {
|
||||
t.Errorf("every table must use the utf8mb4_bin collation, got %d of 6", binaryTables)
|
||||
allTables := columnCount(t, db, "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_type = 'BASE TABLE'")
|
||||
if binaryTables != allTables {
|
||||
t.Errorf("every table must use the utf8mb4_bin collation, got %d of %d", binaryTables, allTables)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -247,7 +248,7 @@ func TestMySQLBackup(t *testing.T) {
|
||||
if line := firstDifferingLine(withoutRedundantCharset(dump), withoutRedundantCharset(string(restoredContent))); line != "" {
|
||||
t.Errorf("replaying the dump must restore the same schema and rows, first difference: %s", line)
|
||||
}
|
||||
restoredUsers := newContractRepositories(restored.DB).users.GetAll()
|
||||
restoredUsers := allOf(newContractRepositories(restored.DB).users.GetAll())
|
||||
if len(restoredUsers) != 2 || restoredUsers[0].Username != "o'brien \"quoted\" back\\slash\nline é😀" || restoredUsers[1].PasswordResetCode != "reset-code" {
|
||||
t.Errorf("unexpected restored users %+v", restoredUsers)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user