Skip to content

sysutils/py-salt: fix the efi grain on FreeBSD #63052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 16, 2023

Conversation

asomers
Copy link
Contributor

@asomers asomers commented Nov 9, 2022

The logic to detect whether we booted from EFI only worked on Linux and Apple, AFAICT.

What does this PR do?

Correctly detects EFI on FreeBSD

What issues does this PR fix or reference?

Fixes:

Previous Behavior

grains.get efi would always return False on FreeBSD

New Behavior

grains.get efi will return the correct value on FreeBSD

Merge requirements satisfied?

Commits signed with GPG?

Yes

@asomers asomers requested a review from a team as a code owner November 9, 2022 22:21
@asomers asomers requested review from twangboy and removed request for a team November 9, 2022 22:21
Copy link
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is gonna need a test and a changelog.

@twangboy twangboy added Needs-Testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases needs-changelog-file labels Nov 14, 2022
@asomers
Copy link
Contributor Author

asomers commented Nov 18, 2022

This is gonna need a test and a changelog.

I can add a changelog entry. But as for tests, there is literally nothing that this function would do except return the value of our mock function. In other words, there's no way to write a test for this function that's different from simply writing the function itself. That's why one-liners usually don't need to be unit-tested.

The logic to detect whether we booted from EFI only worked on Linux and
Apple, AFAICT.
@dwoz
Copy link
Contributor

dwoz commented Dec 11, 2023

@asomers Please add a changelog file.

@dwoz dwoz removed the Needs-Testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases label Dec 11, 2023
dwoz
dwoz previously approved these changes Dec 11, 2023
Copy link
Contributor

@dwoz dwoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending changelog.

@dwoz dwoz merged commit a11b4d5 into saltstack:master Dec 16, 2023
@asomers asomers deleted the freebsd-efi branch August 1, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants