Unit tests for conf.py, and add it to the coverage gate #25
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/confconsole#25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
conf.pyreadsconfconsole.conf(default_nic,publicip_cmd,networking,copy_paste) and writesdefault_nicback. No test imports it today, so it is at 0 percent and outside the CI gate. It is step 3 of the test plan inCOVERAGE.md.What to do
tests/test_conf.py. Use pytest'stmp_pathandmonkeypatch.chdirsopath()finds a scratchconf/confconsole.conf; nothing may touch/etc. Cover:path(): the file found underconf/, andConfconsoleConfErrorwhen it is missing everywhere.Conf()reading each option, comments and blank lines,networking/copy_pastetrue and false,autostartignored, and an illegal line raisingConfconsoleConfError.set_default_nic: replacing an existing line, appending when there is none, keeping comments and other settings, and a file whose last line has no newline.confto thepackage:list in.github/workflows/tests.yml.Done when
conf.pyis at 100 percent line and branch coverage,confis in the measured list, and thetestscheck is green.conf.pyis unchanged.Help
Ask in https://github.com/orgs/Keel-Linux/discussions
I’d like to work on this issue and add the missing test coverage. Could you please assign it to me?