View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
19927Bug reportsInstallationpublic2025-01-09 13:20
ReporterRyszard Assigned Togabrieljenik  
PrioritynoneSeverityblock 
Status assignedResolutionopen 
Product Version6.6.x 
Summary19927: postgres and unit tests
Description

I have installed the latest version of LimeSurvey 6.10.0. As the first step, I ran the unit tests. When using MySQL, all the tests pass successfully (100%). However, when using PostgreSQL, several errors occur. (2 errors, 4 failures)

Steps To Reproduce

Steps to reproduce

git clone
run installer: http://127.0.0.1/index.php?r=installer/welcome
composer install
DROP DATABASE limesurvey; CREATE DATABASE limesurvey;
php application/commands/console.php install admin password TravisLS no@email.com verbose
touch enabletests
chmod 777 tests/tmp/
DOMAIN=localhost ./vendor/bin/phpunit tests/unit

Expected result

Unit tests passed:
OK, but incomplete, skipped, or risky tests!
Tests: 558, Assertions: 18585, Skipped: 5.

Actual result

There were 2 errors:

1) ls\tests\LSYiiValidatorsTest::testLanguageFilters
2) ls\tests\GroupHelperTest::testQuestionGroupChange

There were 4 failures:

1) ls\tests\GroupHelperTest::testQuestionGroupChangeOnActiveSurvey
2) ls\tests\CPDImportParticpantsTest::testParticipantWithOneAttributeImportedSucessfully
3) ls\tests\CPDImportParticpantsTest::testParticipantUpdatedSuccessfullyWhenUpdateTrue
4) ls\tests\CPDImportParticpantsTest::testParticipantWithOneEncryptedAttributeImportedSucessfully

ERRORS!
Tests: 558, Assertions: 1643, Errors: 2, Failures: 4, Skipped: 13.

TagsNo tags attached.
Attached Files
postresql unit tests logs.txt (3,023 bytes)   
There were 2 errors:

1) ls\tests\LSYiiValidatorsTest::testLanguageFilters
CDbException: CDbCommand failed to execute the SQL statement: SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for type integer: ""
LINE 1: ...ssions.entity='surveysgroups' AND permissions.uid='')  LEFT ...
                                                             ^

/var/www/html/vendor/yiisoft/yii/framework/db/CDbCommand.php:543
/var/www/html/vendor/yiisoft/yii/framework/db/CDbCommand.php:396
/var/www/html/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php:1359
/var/www/html/application/models/LSActiveRecord.php:77
/var/www/html/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php:1478
/var/www/html/application/models/SurveysGroups.php:356
/var/www/html/application/models/Survey.php:518
/var/www/html/vendor/yiisoft/yii/framework/base/CModel.php:284
/var/www/html/vendor/yiisoft/yii/framework/base/CModel.php:260
/var/www/html/vendor/yiisoft/yii/framework/base/CModel.php:158
/var/www/html/application/models/Survey.php:969
/var/www/html/tests/unit/LSYiiValidatorsTest.php:296
/var/www/html/vendor/bin/phpunit:122

2) ls\tests\GroupHelperTest::testQuestionGroupChange
CDbException: CDbCommand failed to execute the SQL statement: SQLSTATE[42703]: Undefined column: 7 ERROR:  column "Q03" does not exist
LINE 3: WHERE (title = "Q03") AND (sid=194594)
                       ^

/var/www/html/vendor/yiisoft/yii/framework/db/CDbCommand.php:543
/var/www/html/vendor/yiisoft/yii/framework/db/CDbCommand.php:377
/var/www/html/tests/unit/helpers/GroupHelperTest.php:169
/var/www/html/vendor/bin/phpunit:122

--

There were 4 failures:

1) ls\tests\GroupHelperTest::testQuestionGroupChangeOnActiveSurvey
Apparently, the question was moved from one group to another, this should not happen in active surveys.
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'error'
+'success'

/var/www/html/tests/unit/helpers/GroupHelperTest.php:212
/var/www/html/vendor/bin/phpunit:122

2) ls\tests\CPDImportParticpantsTest::testParticipantWithOneAttributeImportedSucessfully
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'http://www.example.com'
+''

/var/www/html/tests/unit/helpers/remotecontrol/CPDImportParticpantsTest.php:145
/var/www/html/vendor/bin/phpunit:122

3) ls\tests\CPDImportParticpantsTest::testParticipantUpdatedSuccessfullyWhenUpdateTrue
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'http://www.example.org'
+''

/var/www/html/tests/unit/helpers/remotecontrol/CPDImportParticpantsTest.php:194
/var/www/html/vendor/bin/phpunit:122

4) ls\tests\CPDImportParticpantsTest::testParticipantWithOneEncryptedAttributeImportedSucessfully
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'123456789'
+''

/var/www/html/tests/unit/helpers/remotecontrol/CPDImportParticpantsTest.php:283
/var/www/html/vendor/bin/phpunit:122

ERRORS!
Tests: 558, Assertions: 1643, Errors: 2, Failures: 4, Skipped: 13.

postresql unit tests logs.txt (3,023 bytes)   
Bug heat2
Complete LimeSurvey version number (& build)'6.10.0' ('')
I will donate to the project if issue is resolvedNo
Browsernope
Database type & versionpostgres 15
Server OS (if known)Debian GNU/Linux 12 (bookworm)
Webserver software & version (if known)
PHP Version8.3

Users monitoring this issue

Ryszard

Activities

Issue History

Date Modified Username Field Change
2025-01-09 12:44 Ryszard New Issue
2025-01-09 12:44 Ryszard File Added: postresql unit tests logs.txt
2025-01-09 12:46 Ryszard Issue Monitored: Ryszard
2025-01-09 12:46 Ryszard Bug heat 0 => 2
2025-01-09 13:20 tibor.pacalat Assigned To => gabrieljenik
2025-01-09 13:20 tibor.pacalat Status new => assigned