-
Notifications
You must be signed in to change notification settings - Fork 175
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
fix: Update value format of CupsBrowsedConf #4230
fix: Update value format of CupsBrowsedConf #4230
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4230 +/- ##
==========================================
- Coverage 76.70% 76.69% -0.01%
==========================================
Files 759 759
Lines 41792 41788 -4
Branches 9604 9603 -1
==========================================
- Hits 32055 32051 -4
Misses 8638 8638
Partials 1099 1099
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: jiazhang <jiazhang@redhat.com>
7a71d94
to
a699136
Compare
assert result['BrowseRemoteProtocols'] == ['dnssd', 'cups'] | ||
assert sorted(result['BrowseAllow']) == sorted(['192.168.0.1', '192.168.0.255', 'cups.example.com']) | ||
assert result['BrowseRemoteProtocols'] == ['dnssd cups', 'none'] | ||
assert result['BrowseAllow'] == ['192.168.0.1', '192.168.0.255', 'cups.example.com', '192.168.0.255'] |
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.
Better add a special description (note) to the parser's doc, like:
.. note::
Values of each directives will be store as a list with the original order,
and duplicated values will be kept without de-duplication.
548b9a2
to
1419dbf
Compare
Signed-off-by: jiazhang <jiazhang@redhat.com>
- Per the manual and tests of cups_browsed.conf, different directives will be handled differently. E.g, for BrowseAllow, all its configured values will be kept, but for BrowseRemoteProtocols, only its last one will work. Signed-off-by: jiazhang <jiazhang@redhat.com> (cherry picked from commit 31bfcdb)
All Pull Requests:
Check all that apply:
Complete Description of Additions/Changes:
Update the value format of this parser to adjust the Advisor rule.
different directives will be handled differently. E.g,
for
BrowseAllow
, all its configured values will be kept,but for
BrowseRemoteProtocols
, only its last one will work.