Skip to content

test: fix test_get_domainname_isc_dhclient mock leak#6824

Closed
ani-sinha wants to merge 1 commit intocanonical:mainfrom
ani-sinha:fix-test1
Closed

test: fix test_get_domainname_isc_dhclient mock leak#6824
ani-sinha wants to merge 1 commit intocanonical:mainfrom
ani-sinha:fix-test1

Conversation

@ani-sinha
Copy link
Copy Markdown
Contributor

@ani-sinha ani-sinha commented Apr 1, 2026

Proposed Commit Message

Without mocking out dhcp.IscDhclient.get_newest_lease_file_from_distro, this function on some platforms returns None as it is not able to find the lease files on the host. This means get_key_from_latest_lease() bails out early without calling parse_leases() to parse the lease file. Fix it.

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

Without mocking out dhcp.IscDhclient.get_newest_lease_file_from_distro, the
functions on some platforms returns None. This means
get_key_from_latest_lease() bails out early without calling parse_leases()
to parse the lease file. Fix it.

Signed-off-by: Ani Sinha <anisinha@redhat.com>
@ani-sinha
Copy link
Copy Markdown
Contributor Author

Sent as a part of #6829 .

@ani-sinha ani-sinha closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant