You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are sometimes error messages when running unit tests in the dev environment which were observed when reviewing PR #1987.
To reproduce the problem:
Run ./up.sh to start dev GigaDB instance.
Run RelationDAOTest unit test:
docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit RelationDAOTest
1) RelationDAOTest: Itshould add reciprocal relation | #0
Test tests/unit/RelationDAOTest.php:testItshouldAddReciprocalRelation
[PHPUnit_Framework_Exception] Trying to get property 'id' of non-object
#1 /var/www/protected/models/RelationDAO.php:64
#2 /var/www/tests/unit/RelationDAOTest.php:65
#3 RelationDAOTest->testItshouldAddReciprocalRelation
However, running all unit tests by executing docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit will allow RelationDAOTest to pass. If you then run docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit RelationDAOTest then this will pass too.
Feels like running docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit makes docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit RelationDAOTest use test data in protected/tests/fixtures. If you execute docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit RelationDAOTest immediately after ./up.sh then dev data is used in unit tests which may be related to why it was sometimes failing for me.
The text was updated successfully, but these errors were encountered:
There are sometimes error messages when running unit tests in the dev environment which were observed when reviewing PR #1987.
To reproduce the problem:
./up.sh
to start dev GigaDB instance.However, running all unit tests by executing
docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit
will allowRelationDAOTest
to pass. If you then rundocker-compose run --rm test ./vendor/codeception/codeception/codecept run unit RelationDAOTest
then this will pass too.Feels like running
docker-compose run --rm test ./vendor/codeception/codeception/codecept run unit
makesdocker-compose run --rm test ./vendor/codeception/codeception/codecept run unit RelationDAOTest
use test data inprotected/tests/fixtures
. If you executedocker-compose run --rm test ./vendor/codeception/codeception/codecept run unit RelationDAOTest
immediately after./up.sh
then dev data is used in unit tests which may be related to why it was sometimes failing for me.The text was updated successfully, but these errors were encountered: