Skip to content
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

Unittests for 404 html page #710

Merged
merged 7 commits into from
Feb 16, 2022
Merged

Unittests for 404 html page #710

merged 7 commits into from
Feb 16, 2022

Conversation

veloman-yunkan
Copy link
Collaborator

Should be merged after #709

This PR is part of a larger campaign of extending the kiwix-serve test-suite, so that major changes related to kiwix/kiwix-tools#59 and #650 can be implemented in a safer environment.

@kelson42 kelson42 added this to the 10.1.0 milestone Feb 11, 2022
Base automatically changed from unittest_for_suggestions to master February 16, 2022 10:30
@codecov
Copy link

codecov bot commented Feb 16, 2022

Codecov Report

Merging #710 (34d069e) into master (892db07) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #710   +/-   ##
=======================================
  Coverage   57.97%   57.97%           
=======================================
  Files          54       54           
  Lines        3569     3569           
  Branches     2007     2007           
=======================================
  Hits         2069     2069           
  Misses       1499     1499           
  Partials        1        1           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 892db07...34d069e. Read the comment docs.

Copy link
Member

@mgautierfr mgautierfr left a comment

Choose a reason for hiding this comment

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

There is the empty line revealed by code factor to remove but else we are good.

This test was introduced with the purpose of testing the error message
in the 404 page returned by /random for a non-existent book. The actual
expected output currently present in this new unit-test is too much for
that purpose and may become a maintenance burden if more tests of that
kind are added.
The `ServerTest.RandomOnNonExistentBook` unit test was replaced with a
more general one testing multiple 404 scenarios where the content of the
body is checked too.
@mgautierfr
Copy link
Member

There is the empty line revealed by code factor to remove but else we are good.

I've made it (and rebased on master)

@mgautierfr mgautierfr merged commit 4cce4dc into master Feb 16, 2022
@mgautierfr mgautierfr deleted the unittests_for_404_html_page branch February 16, 2022 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants