-
Task
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
-
image-builder-1
-
Image Builder 10
-
3
The `dnfjson` package in `osbuild/images` has been renamed to `depsolvednf`. Moreover, data structures from `rpmmd` are being heavily used by the depsolving library. `rpmmd` needs to be refactored and consolidated to prepare for SBOM generation re-architecture. This will also include changes to the `osbuild-depsolve-dnf` tool.
To make it easier to port current and future changes in the `osbuild/images` repository to composer, this PR simplifies how `osbuild-depsolve-dnf` is being mocked in (weldr API) unit tests.
Previously, unit tests were compiling a mock binary which had to mimic `osbuild-depsolve-dnf` API and behavior, while in reality, the goal should have been to mock the `dnfjson` package API from `osbuild/images`. This PR moves the mocking to the correct layer, which makes osbuild-composer unit tests less coupled with the underlying implementation of depsolving.
Note that the number of added new lines of code is skewed by the test case structures reformatting in the `internal/weldr/api_test.go`, so in reality, much more code has been removed.
/jira-epic HMS-8910