Add RethinkDB tests

- Add env variables for all data tests
- Standardize Page.All behavior
- Add Page.Count* tests
This commit is contained in:
2024-01-27 18:04:41 -05:00
parent f701fc9c93
commit 0e8044b948
10 changed files with 220 additions and 17 deletions

View File

@@ -36,13 +36,13 @@ type SQLitePageData(conn: SqliteConnection, log: ILogger) =
// IMPLEMENTATION FUNCTIONS
/// Get all pages for a web log (without text or revisions)
/// Get all pages for a web log (without text, metadata, revisions, or prior permalinks)
let all webLogId =
log.LogTrace "Page.all"
conn.customList
$"{Query.selectFromTable Table.Page} WHERE {Document.Query.whereByWebLog} ORDER BY LOWER({titleField})"
[ webLogParam webLogId ]
(fun rdr -> { fromData<Page> rdr with Text = "" })
(fun rdr -> { fromData<Page> rdr with Text = ""; Metadata = []; PriorPermalinks = [] })
/// Count all pages for the given web log
let countAll webLogId =