[GH-ISSUE #19] Add unit tests #10

Closed
opened 2026-02-25 23:33:15 +03:00 by kerem · 2 comments
Owner

Originally created by @peteretelej on GitHub (Mar 2, 2018).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/19

Set up tests, at least for ./cmd

Can work on this.

Originally created by @peteretelej on GitHub (Mar 2, 2018). Original GitHub issue: https://github.com/go-shiori/shiori/issues/19 Set up tests, at least for ./cmd Can work on this.
kerem closed this issue 2026-02-25 23:33:15 +03:00
Author
Owner

@skx commented on GitHub (Mar 2, 2018):

Good pull-request, but I suspect you really should update the sqlite handler to allow a filename to be specified - then use a temporary file.

Otherwise you risk blowing away a users valid shiori.db file.

<!-- gh-comment-id:369983061 --> @skx commented on GitHub (Mar 2, 2018): Good pull-request, but I suspect you really _should_ update the sqlite handler to allow a filename to be specified - then use a temporary file. Otherwise you risk blowing away a users valid `shiori.db` file.
Author
Owner

@peteretelej commented on GitHub (Mar 2, 2018):

Yeah, I think a filename passed to db.OpenSQLiteDatabase would be best.

Though, the TestMain's tear only runs for package cmd, so unless one runs ./shiori in cmd, it won't affect the main db file.

In any case, let me update the PR with the filename arg.

<!-- gh-comment-id:369991177 --> @peteretelej commented on GitHub (Mar 2, 2018): Yeah, I think a filename passed to `db.OpenSQLiteDatabase` would be best. Though, the TestMain's tear only runs for package cmd, so unless one runs `./shiori` in cmd, it won't affect the main db file. In any case, let me update the PR with the filename arg.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#10
No description provided.