Skip to content

[5.x]: Codeception tests for plugin failing since version 5.5.0 #16624

@creode-dev

Description

@creode-dev

What happened?

Description

I'm just carrying out some updates to my Craft Plugin and I have noticed some errors coming back from CraftCMS. I've traced these errors back to version 5.5.0 of Craft CMS, last working version of my test suite was 5.4.10 (though I did have to modify the startApp function within the craft\test\CraftConnector due to another issue that seems to have been patched recently. Think it may have been this one (#16577)

Steps to reproduce

  1. Clone my CraftCMS plugin from here: https://github.com/creode/magic-login/
  2. Startup DDEV container for plugin
  3. Run composer install/update
  4. Setup a database configuration, by creating a .env file within the tests folder and point it to your DDEV database
  5. Run ddev composer test from the host machine to trigger my test suite

Expected behavior

I'd expect the tests to start running and give status of build.

Actual behavior

Instead, the suite is failing with the attached error message:

In Schema.php line 676:
                                                                                                
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.craft_plugins' doesn't exist  
  The SQL being executed was: SELECT `id`, `handle`, `version`, `schemaVersion`, `installDate`  
  FROM `craft_plugins`                                                                          
  ORDER BY `handle`                                                                             
                                                                                                

In Command.php line 1320:
                                                                                                
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.craft_plugins' doesn't exist  

Image

Craft CMS version

= 5.5.0

PHP version

8.2

Operating system and version

DDEV (Linux)

Database type and version

MariaDB 10.4

Image driver and version

GD?

Installed plugins and versions

  • Suite is running from the basic installation of Craft CMS with minimal dependencies. See the above comment for the repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions