-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
added cutomIndexTemplate option to kiwix-serve #607
Conversation
Codecov Report
@@ Coverage Diff @@
## master #607 +/- ##
==========================================
- Coverage 66.10% 63.23% -2.87%
==========================================
Files 53 53
Lines 3815 3452 -363
Branches 1913 1933 +20
==========================================
- Hits 2522 2183 -339
+ Misses 1291 1266 -25
- Partials 2 3 +1
Continue to review full report at Codecov.
|
@mgautierfr @veloman-yunkan, where can I add test for |
@MananJethwani I don't think there is such a test. I also believe that the best way to test this functionality would be in kiwix-tools, by running the kiwix-serve binary via pytest. Please see kiwix/kiwix-tools#375 for how I had intended to do something similar, before @kelson42 fairly pointed out that that feature better be tested in libkiwix via googletest. |
I want indeed to have the httpd daemon primitive tested within libkiwix and I don't understand what stop us to do it. |
1 similar comment
I want indeed to have the httpd daemon primitive tested within libkiwix and I don't understand what stop us to do it. |
@kelson42 and @veloman-yunkan can you please have a look at the tests I have created, thanks. |
@MananJethwani We should add a document in the README about the template variables which are exposed. |
80a4b06
to
24540db
Compare
I wonder if this is not a bit too much. Maybe it is enough to let the user set the index title and allowing it to simply set a custom css ? |
@MananJethwani Hi, any feedback here to Matthieu's comments? |
@kelson42 extremely sorry for the delay will update the PR by tomorrow P.S. - sorry I actually missed the mail😅 |
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.
See my comments in the code.
You've adapted the test code but we don't really test the feature itself as we never try to run a test with a custom template.
A basic test would be to pass a custom template with a specific word/sentence and check that this word is correctly present in the output.
@mgautierfr any updates? |
I have rebased the branch on |
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.
We still need a bit more testing. To be sure we actually use the custom template index passed.
I think you can also simplify the git history. We probably need two commits :
- One to add the handling off the customIndexTemplate (and the associated tests)
- One to expose the 3 helper functions in
tools.h
d395d22
to
fbc8272
Compare
fbc8272
to
78de13d
Compare
78de13d
to
63b031f
Compare
63b031f
to
07e8f99
Compare
@mgautierfr any updates? |
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.
From a user perspective, works as expected.
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.
Yet a last easy fix in the test (I could have found this in previous review but miss it because of the double reset).
Everything else is good.
07e8f99
to
30e4c54
Compare
this fixes #571