test: Add comprehensive tests for log_scan_summary function#161
Draft
test: Add comprehensive tests for log_scan_summary function#161
Conversation
Co-authored-by: jade-codes <9397730+jade-codes@users.noreply.github.com>
Co-authored-by: jade-codes <9397730+jade-codes@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add comprehensive tests for scan-log-scan-summary module
test: Add comprehensive tests for log_scan_summary function
Jan 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #34 requested comprehensive tests for
mother::commands::scan::log_scan_summary. This function formats scan completion logs based on phase results and error counts.Changes
Created
tests_log_scan_summary.rs: 33 tests covering the function through its public APIUpdated
mod.rs: Added test module declarationThe function has two output paths based on error count:
Tests validate both paths and verify correct error aggregation across all phases.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
192.168.1.100/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no /src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp ld/libgit2-sys-6--detach 391434208d186a.03vezhwziri9anrj51plxwh9p.1ivzc5n.rcgu.o 391434208d186a.06ri2rxu3b84aka49nyzzxhb1.1ivzc5n.rcgu.o 391434208d186a.0/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc 391434208d186a.0--crate-name 391434208d186a.0event_listener 391434208d186a.0--edition=2021(packet block)invalid-host/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no /src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp ld/libgit2-sys-6--detach 391434208d186a.03vezhwziri9anrj51plxwh9p.1ivzc5n.rcgu.o 391434208d186a.06ri2rxu3b84aka49nyzzxhb1.1ivzc5n.rcgu.o 391434208d186a.0/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc 391434208d186a.0--crate-name 391434208d186a.0event_listener 391434208d186a.0--edition=2021(dns block)invalid-uri/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no /src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp ld/libgit2-sys-6--detach 391434208d186a.03vezhwziri9anrj51plxwh9p.1ivzc5n.rcgu.o 391434208d186a.06ri2rxu3b84aka49nyzzxhb1.1ivzc5n.rcgu.o 391434208d186a.0/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc 391434208d186a.0--crate-name 391434208d186a.0event_listener 391434208d186a.0--edition=2021(dns block)neo4j.example.com/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no /src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp ld/libgit2-sys-6--detach 391434208d186a.03vezhwziri9anrj51plxwh9p.1ivzc5n.rcgu.o 391434208d186a.06ri2rxu3b84aka49nyzzxhb1.1ivzc5n.rcgu.o 391434208d186a.0/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc 391434208d186a.0--crate-name 391434208d186a.0event_listener 391434208d186a.0--edition=2021(dns block)neo4j.production.example.com/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no /src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp ld/libgit2-sys-6--detach 391434208d186a.03vezhwziri9anrj51plxwh9p.1ivzc5n.rcgu.o 391434208d186a.06ri2rxu3b84aka49nyzzxhb1.1ivzc5n.rcgu.o 391434208d186a.0/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc 391434208d186a.0--crate-name 391434208d186a.0event_listener 391434208d186a.0--edition=2021(dns block)nonexistent.host.that.does.not.exist/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no /src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp ld/libgit2-sys-6--detach 391434208d186a.03vezhwziri9anrj51plxwh9p.1ivzc5n.rcgu.o 391434208d186a.06ri2rxu3b84aka49nyzzxhb1.1ivzc5n.rcgu.o 391434208d186a.0/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc 391434208d186a.0--crate-name 391434208d186a.0event_listener 391434208d186a.0--edition=2021(dns block)not-a-valid-uri/home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 /home/REDACTED/work/mother/mother/target/debug/deps/mother_cli-d349731c4bc5c110 --test-threads=4 --emit=dep-info,metadata -C opt-level=1 -C embed-bitcode=no /src/lib.rs codegen-units=256 -C debuginfo=2 -C ttp ld/libgit2-sys-6--detach 391434208d186a.03vezhwziri9anrj51plxwh9p.1ivzc5n.rcgu.o 391434208d186a.06ri2rxu3b84aka49nyzzxhb1.1ivzc5n.rcgu.o 391434208d186a.0/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc 391434208d186a.0--crate-name 391434208d186a.0event_listener 391434208d186a.0--edition=2021(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.