Test fails with custom configuration
Since your module provides a settings.yml file, it must also provide a mymodule.schema.yml file describing the config object that stores the settings.

The real error pertains to something along these lines, and not a database error:

The test did not complete due to a fatal error.
Exception Uncaught e ConfigSchemaCheck   86 Drupal\Core\Config\Testing\ConfigSc
    Drupal\Core\Config\Schema\SchemaIncompleteException: No schema for
    MODULENAME.settings in
    Drupal\Core\Config\Testing\ConfigSchemaChecker-&amp;gt;onConfigSave() (line 86
    of
    /var/www/docroot/core/lib/Drupal/Core/Config/Testing/ConfigSchemaChecker.php).


By providing a schema.yml file, clearing cache and re-running the tests this should resolve itself.

Related: 


https://www.drupal.org/node/2848879
Simpletest fails with &quot;invalid database prefix&quot; - no other information given


You have to be careful of this one, because any contrib module that provides a settings.yml without a matching schema will throw the same error. It is confusing because you can install the module in your main application, but when you install it with a test, it will error out.

It will be easy to narrow down which ones, because it will be one that is listed in your required modules var (protected static $modules = [...]) which is how I stumbled upon the Menu Breadcrumb issue I mentioned.