← Back to issue list

tests: mock dependency loading for patch elf test

View original Github issue

Metadata

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

Current evaluation

Merged a fix for a lifecycle unit test incorrectly loading host dependencies for /bin/true during patch elf testing. The change properly mocks dependency loading, passed CI, and added four lines of code.

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`? ----- One of the lifecycle unit tests was not properly mocked. The test was loading dependencies for `/bin/true`, which is a process that is dependent on the host's copy of `ldd` and whether the `core22` snap is installed on the host.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged a fix for a lifecycle unit test incorrectly loading host dependencies for /bin/true during patch elf testing. The change properly mocks dependency loading, passed CI, and added four lines of code.
qwen3.6-35b-a3b-mtp-q6 Merged into main. Fixed a unit test by properly mocking dependency loading for the patchelf test, removing host-dependent ldd and core22 snap requirements. Achieved 100% diff coverage.
qwen3.6-35b-a3b-mtp-q6 Merged into main. Fixed a lifecycle unit test by properly mocking dependency loading for the patchelf test, eliminating host ldd and core22 snap dependencies. Maintained 100% test coverage.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#5135 fix(test): add patchelf to dev dependencies for testing snapcraft closed Superseded by PR #5225. The pull request adding patchelf to dev dependencies was closed as obsolete after maintainers discussed architectural concerns regarding patchelf usage in tests and development environments.
70%