Skip to content

Commit 4d78c6a

Browse files
committed
[Change] tests: prune tautological assertions in 01-install-cli + 47-ignore-inotify-defaults
[Change] 01-install-cli.bats: remove "uninstall.sh delegates service removal to pkg_service_uninstall" — tautological grep-for-token assertion, proves string presence but not behavior [Change] 47-ignore-inotify-defaults.bats: remove "ignore_inotify.defaults is installed at internals path" — adjacent "has non-comment entries" test implicitly requires the file to exist (grep -c on a missing path exits non-zero), so the existence assertion is redundant coverage
1 parent 2303da9 commit 4d78c6a

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ v2.0.1 | Mar 25 2026:
8989

9090
-- Changes --
9191

92+
[Change] tests: prune two tautological assertions — the
93+
"uninstall.sh delegates service removal to pkg_service_uninstall"
94+
grep-for-token check in 01-install-cli.bats (string presence, not
95+
behavior) and the "ignore_inotify.defaults is installed at
96+
internals path" existence check in 47-ignore-inotify-defaults.bats
97+
(adjacent "has non-comment entries" test already fails if the
98+
file is missing)
9299
[Change] monitor: log filtered-cycle event count when all events dropped by
93100
tier-2 scan filter (_event_count > 0 but _tot_files == 0); issue #485
94101
[Change] tests/helpers/uat-lmd.bash: de-duplicate Dockerfile-level

CHANGELOG.RELEASE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ v2.0.1 | Mar 25 2026:
8989

9090
-- Changes --
9191

92+
[Change] tests: prune two tautological assertions — the
93+
"uninstall.sh delegates service removal to pkg_service_uninstall"
94+
grep-for-token check in 01-install-cli.bats (string presence, not
95+
behavior) and the "ignore_inotify.defaults is installed at
96+
internals path" existence check in 47-ignore-inotify-defaults.bats
97+
(adjacent "has non-comment entries" test already fails if the
98+
file is missing)
9299
[Change] monitor: log filtered-cycle event count when all events dropped by
93100
tier-2 scan filter (_event_count > 0 but _tot_files == 0); issue #485
94101
[Change] tests/helpers/uat-lmd.bash: de-duplicate Dockerfile-level

tests/01-install-cli.bats

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ setup_file() {
110110
! grep -rq 'OSTYPE.*FreeBSD' "$LMD_INSTALL/internals/" "$LMD_INSTALL/maldet"
111111
}
112112

113-
@test "uninstall.sh delegates service removal to pkg_service_uninstall" {
114-
grep -q 'pkg_service_uninstall' "$LMD_INSTALL/uninstall.sh"
115-
}
116-
117113
# Man page tests
118114
@test "maldet.1.gz compressed man page exists at install path" {
119115
[ -f "$LMD_INSTALL/maldet.1.gz" ]

tests/47-ignore-inotify-defaults.bats

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ _source_lmd_stack() {
2929

3030
# --- Defaults file shape ---
3131

32-
# bats test_tags=monitor,defaults
33-
@test "defaults: ignore_inotify.defaults is installed at internals path" {
34-
[ -f "$LMD_INSTALL/internals/ignore_inotify.defaults" ]
35-
}
36-
3732
# bats test_tags=monitor,defaults
3833
@test "defaults: ignore_inotify.defaults has non-comment entries" {
3934
run bash -c "grep -c '^[^#[:space:]]' '$LMD_INSTALL/internals/ignore_inotify.defaults'"

0 commit comments

Comments
 (0)