Skip to content

test: cover the API branches nothing reached - #860

Merged
blaipr merged 1 commit into
mainfrom
test/cover-the-api-branches-nothing-reached
Aug 23, 2026
Merged

test: cover the API branches nothing reached#860
blaipr merged 1 commit into
mainfrom
test/cover-the-api-branches-nothing-reached

Conversation

@blaipr

@blaipr blaipr commented Aug 23, 2026

Copy link
Copy Markdown
Member

Three untested branches in the REST API.

The upload endpoint's refusal when no MIME types are configured at all: with
<filesAllowedMime> absent, getFilesAllowedMime() answers an empty list and every
upload is refused. The element has to be removed before the first API call rather
than between calls — the config file cache invalidates on mtime, which has one-second
resolution, so a rewrite mid-test races it and the second call can still read the old
config.

The client view endpoint's customFields=1 arm, which requires the master password and
parses the include — previously only the default path was covered.

EventlogHelp::clear(), which declares no parameters. It was the last uncovered line in
the API controllers.

Three untested branches in the REST API.

The upload endpoint's refusal when no MIME types are configured at all: with
`<filesAllowedMime>` absent, getFilesAllowedMime() answers an empty list and every
upload is refused. The element has to be removed *before* the first API call rather
than between calls — the config file cache invalidates on mtime, which has one-second
resolution, so a rewrite mid-test races it and the second call can still read the old
config.

The client view endpoint's `customFields=1` arm, which requires the master password and
parses the include — previously only the default path was covered.

EventlogHelp::clear(), which declares no parameters. It was the last uncovered line in
the API controllers.
@blaipr
blaipr merged commit 235a6a6 into main Aug 23, 2026
8 checks passed
@blaipr
blaipr deleted the test/cover-the-api-branches-nothing-reached branch August 23, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant