-
Notifications
You must be signed in to change notification settings - Fork 908
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
archlinux: Fix broken locale logic #796
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've verified that the CLA has been signed. Thanks for this PR.
I left a couple comments inline. Additionally, can you provide a unit test for this behavior? There's a very small unit test file at unittests/test_distros/test_arch.py . Ensuring we write out the correct locale config would be a very useful unit test.
|
We use mocks in our unit tests. For testing this particular functionality, it would make sense to have tests that show:
I earlier linked you to some Arch tests, but looking again, it'd probably make more sense for them to go into the test_handler_locale tests . There are also other examples in there showing how some of the mocking works. I hope that all makes sense. Let me know if you have any questions or need some additional guidance. Further test guidelines can be found here: |
The locale wasn't persisted correct nor set. LP: https://bugs.launchpad.net/cloud-init/+bug/1402406
Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close. If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging mitechie, and he will ensure that someone takes a look soon. (If the pull request is closed and you would like to continue working on it, please do tag mitechie to reopen it.) |
Real life is getting in the way and writing tests is a bit more complicated than writing plain Python code. I hope to find some time in the near future. |
@mitechie can you reopen? @TheRealFalcon I pushed the unit test code but the PR is apparently not updating when it is closed. |
@klausenbusk , unfortunately it appears that github doesn't allow reopening of PRs that have had their branch force-pushed to. Feel free to open a new PR with your changes. |
TIL. I opened a new PR: #841 |
Proposed Commit Message
Additional Context
See LP bug: https://bugs.launchpad.net/cloud-init/+bug/1402406
Test Steps
This has been tested manually and
/etc/locale.gen
is in the expected format now and the locale is written to/etc/locale.conf
.Checklist: