Bug 20766

Summary: KohaPlugins.t does not clean up
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Kyle M Hall <kyle>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 20181    
Bug Blocks:    

Description Jonathan Druart 2018-05-14 15:37:49 UTC
The tests pass but the DB is altered if plugins exist:

prove t/Koha_Template_Plugin_KohaPlugins.t                                                                                           1 ↵ [12:36:11]
t/Koha_Template_Plugin_KohaPlugins.t .. 1/10 DBD::mysql::db do failed: Table 'koha_plugin_com_bywatersolutions_kitchensink_mytable' already exists [for Statement "
        CREATE TABLE  koha_plugin_com_bywatersolutions_kitchensink_mytable (
            `borrowernumber` INT( 11 ) NOT NULL
        ) ENGINE = INNODB;
    "] at /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm line 303.
Plugin Koha::Plugin::Com::ByWaterSolutions::KitchenSink failed during installation! at /home/vagrant/kohaclone/Koha/Plugins/Base.pm line 51.
t/Koha_Template_Plugin_KohaPlugins.t .. 7/10 DBD::mysql::db do failed: Table 'koha_plugin_com_bywatersolutions_kitchensink_mytable' already exists [for Statement "
        CREATE TABLE  koha_plugin_com_bywatersolutions_kitchensink_mytable (
            `borrowernumber` INT( 11 ) NOT NULL
        ) ENGINE = INNODB;
    "] at /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm line 303.
Plugin Koha::Plugin::Com::ByWaterSolutions::KitchenSink failed during installation! at /home/vagrant/kohaclone/Koha/Plugins/Base.pm line 51.
t/Koha_Template_Plugin_KohaPlugins.t .. ok
Comment 1 Jonathan Druart 2018-05-14 15:39:29 UTC
Tests have been moved from t/Koha_Template_Plugin_KohaPlugins.t to
t/db_dependent/Koha/Template/Plugin/KohaPlugins.t by bug 20764
Comment 2 Jonathan Druart 2018-05-14 16:08:59 UTC
Same for t/db_dependent/Plugins.t
Comment 3 Martin Renvoize 2020-02-06 09:33:09 UTC
I'm not sure what the state of this one is, but it feels like we can de-escalate it.. It's a 'nice to fix', but not a major issue as it only effects developers doing regular testing rather than causing major issues to end users.