TripalCultivate / TripalCultivate-Phenotypes

Provides generic support for large scale phenotypic data and traits with importers, content pages and visualizations.
GNU General Public License v3.0
1 stars 0 forks source link

[Bug] Errors on 4.x branch #68

Closed laceysanderson closed 10 months ago

laceysanderson commented 10 months ago

Drupal Version

10.0

Tripal Version

4.x dev (most recent commit)

Module Version

4.x dev (most recent commit)

Site Operating System

Debian Linux

Installation Method

Docker image built from this module

Browsers

No response

Observations

When building the docker I run into an error inserting term... however, the docker continues to build and professes to complete successfully.

When running the tests on the above docker, I recieve the following failures:

❯ docker exec pheno4x phpunit
PHPUnit 9.6.15 by Sebastian Bergmann and contributors.

Testing 
E
    [TRIPAL LOGGER] ERROR: Error. Could not insert term.
.EE
    [TRIPAL LOGGER] ERROR: Error. Could not insert term.
..........E.........                                          24 / 24 (100%)

Time: 08:31.121, Memory: 16.00 MB

There were 4 errors:

1) Drupal\Tests\trpcultivate_phenotypes\Functional\ConfigOntologyTermsTest::testForm
Behat\Mink\Exception\ElementNotFoundException: Form field with id|name|label|value "cicer_trait" not found.

/var/www/drupal/vendor/behat/mink/src/WebAssert.php:731
/var/www/drupal/web/modules/contrib/TripalCultivate-Phenotypes/trpcultivate_phenotypes/tests/src/Functional/ConfigOntologyTermsTest.php:138
/var/www/drupal/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

2) Drupal\Tests\trpcultivate_phenotypes\Functional\ConfigWatermarkTest::testForm
Behat\Mink\Exception\DriverException: Only string values can be used for a radio input.

/var/www/drupal/vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php:415
/var/www/drupal/vendor/behat/mink/src/Element/NodeElement.php:118
/var/www/drupal/web/core/tests/Drupal/Tests/UiHelperTrait.php:95
/var/www/drupal/web/modules/contrib/TripalCultivate-Phenotypes/trpcultivate_phenotypes/tests/src/Functional/ConfigWatermarkTest.php:86
/var/www/drupal/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

3) Drupal\Tests\trpcultivate_phenotypes\Functional\ImporterFileGeneratorLinkTest::testImporterFileGeneratorLink
This test printed output: 
    [TRIPAL LOGGER] ERROR: Error. Could not insert term.

/var/www/drupal/vendor/phpunit/phpunit/src/Framework/TestResult.php:955

4) Drupal\Tests\trpcultivate_phenotypes\Kernel\ServiceTermTest::testTermService
PHPUnit\Framework\Exception: [site http://localhost] [TRIPAL] ERROR: Error. Could not insert term.

/var/www/drupal/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
/var/www/drupal/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
/var/www/drupal/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
/var/www/drupal/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651
/var/www/drupal/vendor/phpunit/phpunit/src/TextUI/Command.php:144
/var/www/drupal/vendor/phpunit/phpunit/src/TextUI/Command.php:97

ERRORS!
Tests: 24, Assertions: 316, Errors: 4.

Expected Behaviour

I expect that the 4.x should not have any errors ;-p especially as there were not any when we reviewed and merged last. This implies the errors may be related to changes caused by Tripal Core...

Steps to Reproduce

  1. Checkout the most recent commit on 4.x
  2. Build the docker docker build --tag=trpcultivate-pheno:4x ./
  3. Start a container docker run --publish=80:80 -tid --name=pheno4x --volume=/Users/laceysanderson/Dockers/trpcultPheno-4x:/var/www/drupal/web/modules/contrib/TripalCultivate-Phenotypes trpcultivate-pheno:4x
  4. Restart postgresql docker exec pheno4x service postgresql restart
  5. Run tests docker exec pheno4x phpunit

Relevant log output

No response

laceysanderson commented 10 months ago

In the branch I have fixed the following tests:

1) Drupal\Tests\trpcultivate_phenotypes\Functional\ConfigOntologyTermsTest::testForm
Behat\Mink\Exception\ElementNotFoundException: Form field with id|name|label|value "cicer_trait" not found.

2) Drupal\Tests\trpcultivate_phenotypes\Functional\ConfigWatermarkTest::testForm
Behat\Mink\Exception\DriverException: Only string values can be used for a radio input.

However, the term one seems to imply that chado_insert_cvterm is not working :-(