Remove unused consultation test.

Created on 22 February 2024, 4 months ago
Updated 7 March 2024, 4 months ago

Problem/Motivation

Error running CI: https://git.drupalcode.org/project/consultation/-/jobs/855721

$ _PHPUNIT_TESTGROUPS=$(echo $_PHPUNIT_TESTGROUPS | sed -e 's/ //g')
$ if [ "$_PHPUNIT_CONCURRENT" == "0" ]; then # collapsed multi-line command
_PHPUNIT_CONCURRENT=0, _PHPUNIT_TESTGROUPS=--all, WHAT_TO_RUN=
executing: sudo -u www-data -E vendor/bin/phpunit --no-interaction --printer='\Drupal\Tests\Listeners\HtmlOutputPrinter' --bootstrap /builds/project/consultation/web/core/tests/bootstrap.php web/modules/custom/consultation --log-junit /builds/project/consultation/junit.xml  
PHPUnit 9.6.16 by Sebastian Bergmann and contributors.
E                                                                   1 / 1 (100%)
Time: 00:01.693, Memory: 4.00 MB
There was 1 error:
1) Drupal\Tests\consultation\Functional\ConsultationNodeHelperTest::testConsultationHelper
Exception: Drupal\Tests\BrowserTestBase::$defaultTheme is required. See https://www.drupal.org/node/3083055, which includes recommendations on which theme to use.
/builds/project/consultation/web/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:437
/builds/project/consultation/web/core/tests/Drupal/Tests/BrowserTestBase.php:560
/builds/project/consultation/web/core/tests/Drupal/Tests/BrowserTestBase.php:369
/builds/project/consultation/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
ERRORS!
Tests: 1, Assertions: 0, Errors: 1.

Steps to reproduce

Proposed resolution

Debug and fix.

Remaining tasks

  • Debug
  • Fix
  • Rerun

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Kristen Pol
  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    Add more details.

  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    Was able to reproduce locally:

    kristenpol@drupal101-web:/var/www/html$ ./vendor/bin/phpunit -c ./web/core ./web/modules/contrib/consultation
    PHPUnit 9.6.16 by Sebastian Bergmann and contributors.
    
    Testing /var/www/html/web/modules/contrib/consultation
    E                                                                   1 / 1 (100%)R
    
    Time: 00:01.072, Memory: 4.00 MB
    
    There was 1 error:
    
    1) Drupal\Tests\consultation\Functional\ConsultationNodeHelperTest::testConsultationHelper
    Exception: Drupal\Tests\BrowserTestBase::$defaultTheme is required. See https://www.drupal.org/node/3083055, which includes recommendations on which theme to use.
    
    /var/www/html/web/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:427
    /var/www/html/web/core/tests/Drupal/Tests/BrowserTestBase.php:556
    /var/www/html/web/core/tests/Drupal/Tests/BrowserTestBase.php:367
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    
    --
    
    There was 1 risky test:
    
    1) Drupal\Tests\consultation\Functional\ConsultationNodeHelperTest::testConsultationHelper
    This test did not perform any assertions
    
    /var/www/html/web/core/tests/Drupal/Tests/Listeners/DrupalListener.php:65
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:452
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:144
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:97
    
    ERRORS!
    Tests: 1, Assertions: 0, Errors: 1, Risky: 1.
    
    
  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    After adding the $defaultTheme, get this:

    There was 1 error:
    
    1) Drupal\Tests\consultation\Functional\ConsultationNodeHelperTest::testConsultationHelper
    Drupal\Core\Config\UnmetDependenciesException: Configuration objects provided by <em class="placeholder">consultation</em> have unmet dependencies: <em class="placeholder">views.view.consultations (views)</em>
    
    /var/www/html/web/core/lib/Drupal/Core/Config/UnmetDependenciesException.php:100
    /var/www/html/web/core/lib/Drupal/Core/Config/ConfigInstaller.php:527
    /var/www/html/web/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php:132
    /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php:199
    /var/www/html/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php:83
    /var/www/html/web/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:465
    /var/www/html/web/core/tests/Drupal/Tests/BrowserTestBase.php:557
    /var/www/html/web/core/tests/Drupal/Tests/BrowserTestBase.php:367
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    
    
  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    After adding views as dependency, here's the next error:

    There was 1 error:
    
    1) Drupal\Tests\consultation\Functional\ConsultationNodeHelperTest::testConsultationHelper
    Drupal\Core\Config\Schema\SchemaIncompleteException: No schema for consultation.settings
    
    /var/www/html/web/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php:87
    /var/www/html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php:111
    /var/www/html/web/core/lib/Drupal/Core/Config/Config.php:229
    /var/www/html/web/core/lib/Drupal/Core/Config/ConfigInstaller.php:396
    /var/www/html/web/core/lib/Drupal/Core/Config/ConfigInstaller.php:149
    /var/www/html/web/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php:75
    /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php:327
    /var/www/html/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php:83
    /var/www/html/web/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:465
    /var/www/html/web/core/tests/Drupal/Tests/BrowserTestBase.php:557
    /var/www/html/web/core/tests/Drupal/Tests/BrowserTestBase.php:367
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    
    
  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    We'll need to make a schema file for the settings form:

    https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-... β†’

  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    Running into more errors. Given that the test doesn't actually DO anything, then it should be deleted for now.

      /**
       * Tests if the paragraph type class is present when added.
       */
      public function testConsultationHelper() {
    
        return; 
        $this->loginAsAdmin();
    
  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    Changing title.

  • Issue was unassigned.
  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    Removed and will be part of next release.

  • Status changed to Fixed 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    Updating status.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024