Bug 24494 - 00-valid-xml.t shouldn't check node_modules
Summary: 00-valid-xml.t shouldn't check node_modules
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Victor Grousset/tuxayo
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-23 14:52 UTC by Victor Grousset/tuxayo
Modified: 2020-03-18 21:51 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.04, 19.05.09


Attachments
Bug 24494: tests: 00-valid-xml.t shouldn't check node_modules (1.15 KB, patch)
2020-01-23 15:09 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 24494: tests: 00-valid-xml.t shouldn't check node_modules (1.22 KB, patch)
2020-02-13 16:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24494: Make the regex more exact (838 bytes, patch)
2020-02-13 16:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24494: tests: 00-valid-xml.t shouldn't check node_modules (1.29 KB, patch)
2020-02-18 19:46 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24494: Make the regex more exact (903 bytes, patch)
2020-02-18 19:46 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Grousset/tuxayo 2020-01-23 14:52:48 UTC
node_modules exists when generating the CSS from the SCSS with yarn.

And it contains invalid XML file. Which shouldn't be validated by Koha's test suite.

./node_modules/json-schema/draft-zyp-json-schema-03.xml
./node_modules/json-schema/draft-zyp-json-schema-04.xml
Comment 1 Victor Grousset/tuxayo 2020-01-23 15:09:43 UTC
Created attachment 97825 [details] [review]
Bug 24494: tests: 00-valid-xml.t shouldn't check node_modules

== Test plan ==
- work with SCSS (just recompile it if you never did)
  - https://wiki.koha-community.org/wiki/Working_with_staff_client_SCSS
- now you have a node_modules directory
- prove -r t/00-valid-xml.t
- it should fail on files in node_modules
- apply this patch
- prove -r t/00-valid-xml.t
- it should work
- sabotage a legitimate XML file, like etc/SIPconfig.xml
- prove -r t/00-valid-xml.t
- it should fail, good the test is still useful
- undo the sabotage
Comment 2 Jonathan Druart 2020-02-13 16:01:53 UTC
Created attachment 98861 [details] [review]
Bug 24494: tests: 00-valid-xml.t shouldn't check node_modules

== Test plan ==
- work with SCSS (just recompile it if you never did)
  - https://wiki.koha-community.org/wiki/Working_with_staff_client_SCSS
- now you have a node_modules directory
- prove -r t/00-valid-xml.t
- it should fail on files in node_modules
- apply this patch
- prove -r t/00-valid-xml.t
- it should work
- sabotage a legitimate XML file, like etc/SIPconfig.xml
- prove -r t/00-valid-xml.t
- it should fail, good the test is still useful
- undo the sabotage

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Jonathan Druart 2020-02-13 16:01:56 UTC
Created attachment 98862 [details] [review]
Bug 24494: Make the regex more exact

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Martin Renvoize 2020-02-18 19:46:53 UTC
Created attachment 99221 [details] [review]
Bug 24494: tests: 00-valid-xml.t shouldn't check node_modules

== Test plan ==
- work with SCSS (just recompile it if you never did)
  - https://wiki.koha-community.org/wiki/Working_with_staff_client_SCSS
- now you have a node_modules directory
- prove -r t/00-valid-xml.t
- it should fail on files in node_modules
- apply this patch
- prove -r t/00-valid-xml.t
- it should work
- sabotage a legitimate XML file, like etc/SIPconfig.xml
- prove -r t/00-valid-xml.t
- it should fail, good the test is still useful
- undo the sabotage

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2020-02-18 19:46:56 UTC
Created attachment 99222 [details] [review]
Bug 24494: Make the regex more exact

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2020-02-18 19:47:29 UTC
Great work, been meaning to do this myself for ages..

Passed QA
Comment 7 Martin Renvoize 2020-02-19 11:34:49 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 8 Joy Nelson 2020-03-13 00:36:42 UTC
Pushed to 19.11.x branch for 19.11.04
Comment 9 Lucas Gass 2020-03-18 21:51:31 UTC
backported to 19.05.x for 19.05.09