Summary: | Increasing test coverage for C4::Installer | ||
---|---|---|---|
Product: | Koha | Reporter: | Aleisha Amohia <aleisha> |
Component: | Test Suite | Assignee: | Chris Cormack <chris> |
Status: | CLOSED FIXED | QA Contact: | Galen Charlton <gmcharlt> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | dcook, francescalamoore, kyle |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Proposed patch
Bug 11541: Increasing coverage of Installer.pm [SIGNED-OFF] Bug 11541: Increasing coverage of Installer.pm Bug 11541 [Followup] - Increasing test coverage for C4::Installer Bug 11541: Increasing coverage of Installer.pm Bug 11541 [Followup] - Increasing test coverage for C4::Installer [PASSED QA] Bug 11541: Increasing coverage of Installer.pm [PASSED QA] Bug 11541 [Followup] - Increasing test coverage for C4::Installer |
Description
Aleisha Amohia
2014-01-14 01:14:14 UTC
Created attachment 24250 [details] [review] Proposed patch Created attachment 24264 [details] [review] Bug 11541: Increasing coverage of Installer.pm To test 1. Run prove t/Installer.t 2. Apply patch 3. Run prove t/Installer.t Notice more tests are run Signed-off-by: Francesca Moore <francescalamoore@gmail.com> I ran into a problem with the test plan. t/Installer.t doesn't exist prior to this patch. Is this patch introducing a new test, or is this supposed to be an improvement of t/Installer_pm.t? Ah yes, this new patch tests C4::Installer t/Installer_pm.t on the other hand tests C4::Installer::PerlModules So yep, it is a new test file. (In reply to Chris Cormack from comment #4) > Ah yes, this new patch tests > > C4::Installer > > t/Installer_pm.t on the other hand tests > C4::Installer::PerlModules > > So yep, it is a new test file. Cool. In that case, don't we need to add a call to this test elsewhere in Koha? Nope, if its in the t/ dir, it gets run (by jenkins and by make test) Created attachment 24297 [details] [review] [SIGNED-OFF] Bug 11541: Increasing coverage of Installer.pm To test 1. Run prove t/Installer.t 2. Apply patch 3. Run prove t/Installer.t Notice more tests are run Signed-off-by: Francesca Moore <francescalamoore@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 24299 [details] [review] Bug 11541 [Followup] - Increasing test coverage for C4::Installer Tests succeed, but cause many warnings: prove t/Installer.t t/Installer.t .. 1/9 "my" variable $self masks earlier declaration in same scope at t/Installer.t line 19. "my" variable $self masks earlier declaration in same scope at t/Installer.t line 20. "my" variable $self masks earlier declaration in same scope at t/Installer.t line 21. "my" variable $self masks earlier declaration in same scope at t/Installer.t line 22. "my" variable $self masks earlier declaration in same scope at t/Installer.t line 23. Odd number of elements in anonymous hash at t/Installer.t line 17. Use of uninitialized value within @ARGV in anonymous hash ({}) at t/Installer.t line 17. The patch remedies that. Test Plan: 1) Apply first patch on this bug 2) Run "prove t/Installer.t" 3) Note the warnings 4) Apply this patch 5) Repeat step 2 6) Note the warnings are gone Created attachment 24303 [details] [review] Bug 11541: Increasing coverage of Installer.pm To test 1. Run prove t/Installer.t 2. Apply patch 3. Run prove t/Installer.t Notice more tests are run Signed-off-by: Francesca Moore <francescalamoore@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 24306 [details] [review] Bug 11541 [Followup] - Increasing test coverage for C4::Installer Tests succeed, but cause many warnings: prove t/Installer.t t/Installer.t .. 1/9 "my" variable $self masks earlier declaration in same scope at t/Installer.t line 19. "my" variable $self masks earlier declaration in same scope at t/Installer.t line 20. "my" variable $self masks earlier declaration in same scope at t/Installer.t line 21. "my" variable $self masks earlier declaration in same scope at t/Installer.t line 22. "my" variable $self masks earlier declaration in same scope at t/Installer.t line 23. Odd number of elements in anonymous hash at t/Installer.t line 17. Use of uninitialized value within @ARGV in anonymous hash ({}) at t/Installer.t line 17. The patch remedies that. Test Plan: 1) Apply first patch on this bug 2) Run "prove t/Installer.t" 3) Note the warnings 4) Apply this patch 5) Repeat step 2 6) Note the warnings are gone Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Created attachment 24314 [details] [review] [PASSED QA] Bug 11541: Increasing coverage of Installer.pm To test 1. Run prove t/Installer.t 2. Apply patch 3. Run prove t/Installer.t Notice more tests are run Signed-off-by: Francesca Moore <francescalamoore@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests pass :) Created attachment 24315 [details] [review] [PASSED QA] Bug 11541 [Followup] - Increasing test coverage for C4::Installer Tests succeed, but cause many warnings: prove t/Installer.t t/Installer.t .. 1/9 "my" variable $self masks earlier declaration in same scope at t/Installer.t line 19. "my" variable $self masks earlier declaration in same scope at t/Installer.t line 20. "my" variable $self masks earlier declaration in same scope at t/Installer.t line 21. "my" variable $self masks earlier declaration in same scope at t/Installer.t line 22. "my" variable $self masks earlier declaration in same scope at t/Installer.t line 23. Odd number of elements in anonymous hash at t/Installer.t line 17. Use of uninitialized value within @ARGV in anonymous hash ({}) at t/Installer.t line 17. The patch remedies that. Test Plan: 1) Apply first patch on this bug 2) Run "prove t/Installer.t" 3) Note the warnings 4) Apply this patch 5) Repeat step 2 6) Note the warnings are gone Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Pushed to master, along with a couple follow-ups to put the test in the db_dependent subdirectory and test the values of the fields in the $installer object more precisely. Congratulations on having your first patch accepted into Koha, Aleisha! |