Summary: | Test for utf8mb4 encoding and collation | ||
---|---|---|---|
Product: | Project Infrastructure | Reporter: | Tomás Cohen Arazi <tomascohen> |
Component: | QA tools | Assignee: | Tomás Cohen Arazi <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | jonathan.druart, katrin.fischer, kyle, mtompset |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 18336 | ||
Bug Blocks: | |||
Attachments: |
Bug 20080: Test for utf8mb4 encoding and collation
Bug 20080: Test for utf8mb4 encoding and collation Bug 20080: Followup: corrected unless/if logic |
Description
Tomás Cohen Arazi
2018-01-23 19:00:16 UTC
Bug 18336 introduces the use of a different collation and encoding. The QA tools should be adapted if that bug gets its patches pushed to master. Created attachment 70861 [details] [review] Bug 20080: Test for utf8mb4 encoding and collation Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Lacks test plan, and I did try to figure it out. I figure something about prove t/Perl.t in qa-test-tools, but I think there is a data/4/sql and/or data/5/sql file which may affect this, but I keep getting failures. I'm not sure what I'm doing wrong. Easier for you to explain how to prove this works. Those tests are failing in master already. So, to test: To test: - Apply this patch - Change kohastructure.sql with a fake commit creating a table "the old way" - Run: $ kshell k$ qa -c 1 -v 2 => SUCCESS: The QA script gives an error, due to bad encoding/collation - Add a new commit fixing the encoding/collation - Run: $ kshell k$ qa -c 2 -v 2 => SUCCESS: No encoding/collation problems reported! - Sign off :-D Created attachment 70957 [details] [review] Bug 20080: Test for utf8mb4 encoding and collation Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Created attachment 70958 [details] [review] Bug 20080: Followup: corrected unless/if logic Changed unless to if, because unless was the wrong logic. TEST PLAN --------- 1) Run the following commands on a kohadev box: cd ~/qa-test-tools git pull git checkout -b bug_20080 origin/master git bz apply 20080 cd ~/kohaclone git pull git checkout -b bug_20080 origin/master git bz apply 18336 2) Edit ~/kohaclone/installer/data/mysql/kohastructure.sql changing CHARSET and COLLATE on a table to just utf8, instead of the utf8mb variation it is. 3) Run the following commands: git add installer/data/mysql/kohastructure.sql git commit -- doesn't matter what the commit message is. 4) Run the following commands: kshell qa -v 2 -c 1 -- this should fail with a collation problem. 5) Edit ~/kohaclone/installer/data/mysql/kohastructure.sql changing CHARSET and COLLATE on a table back to the utf8mb variation it was. 6) Run the following commands: kshell qa -v 2 -c 2 -- this should pass Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Hm, have a problem with this one: An error occurred : Use of uninitialized value $_ in concatenation (.) or string at /home/vagrant/qa-test-tools/QohA/File/Specific/Kohastructure.pm line 39. ../qa-test-tools/koha-qa.pl -v 2 -c 9 testing 9 commit(s) (applied to f34dcf3 'Bug 18789: (follow-up) Fix page title') Processing files before patches |================> | 4 / 6 (66.67%) An error occurred : Use of uninitialized value $_ in concatenation (.) or string at /home/vagrant/qa-test-tools/QohA/File/Specific/Kohastructure.pm line 39. Issues regarding the QA tools are handled in the Gitlab repository: https://gitlab.com/koha-community/qa-test-tools These patches were wrong, the issue should have been fixed by https://gitlab.com/koha-community/qa-test-tools/issues/1 |