← Back to issue list

tests: add unit test for `capture_logs_from_instance()`

View original Github issue

Metadata

Project
snapcraft
Number
#3937
Type
pull request
State
merged
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

Merged. Adds unit tests for capture_logs_from_instance(), adapted from rockcraft to cover gaps in PR 3935. Approved by one reviewer and passed CI checks before integration.

Suggested action:

No scores available.

Issue body

- [X] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [X] Have you successfully run `make lint`? - [X] Have you successfully run `pytest tests/unit`? ----- I forgot to add unit tests for https://github.com/snapcore/snapcraft/pull/3935. Tests were pulled from [rockcraft](https://github.com/canonical/rockcraft/pull/77/files#diff-213dd6ab20435bf3358d2d1dba0a40ecc55d4a4538869de29a87ba72178442b8R59) (CRAFT-1307)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Adds unit tests for capture_logs_from_instance(), adapted from rockcraft to cover gaps in PR 3935. Approved by one reviewer and passed CI checks before integration.
qwen3.6-35b-a3b-mtp-q6 Merged unit tests for capture_logs_from_instance() as a follow-up to PR #3935. Tests were adapted from the rockcraft repository to verify logging capture functionality.
qwen3.6-35b-a3b-mtp-q6 Merged unit tests for capture_logs_from_instance(), added as a follow-up to PR 3935. Tests were adapted from rockcraft and passed all lint and pytest checks.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#174 tests: check before handling rockcraft instances rockcraft merged Merged a fix wrapping rockcraft LXC instance cleanup in an if condition to prevent errors when spread tests do not create instances. Approved by two reviewers, passed CI, and modified one file.
70%
#79 cli: capture logs in logfile rockcraft merged Merged implementation capturing rockcraft logs to a file when running in managed mode. Approved by reviewer, passed CI, and added six lines to one file.
70%