Bug #13492

Unit tests fail on Docker

Added by José Raddaoui Marín 7 months ago. Updated 4 months ago.

Status:QA/ReviewStart date:03/27/2021
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:Tests
Target version:Release 2.7.0
Google Code Legacy ID: Tested version:2.7
Sponsored:No Requires documentation:

Description

One of the unit tests fails on the Docker environment:

PHPUnit 9.5.4 by Sebastian Bergmann and contributors.

...........................F..................................... 65 / 66 ( 98%)
.                                                                 66 / 66 (100%)

Time: 00:00.073, Memory: 16.00 MB

There was 1 failure:

1) PhysicalObjectCsvImporterTest::testSetFilenameFileUnreadableException
Failed asserting that exception of type "sfException" is thrown.

FAILURES!
Tests: 66, Assertions: 87, Failures: 1.
Script phpunit handling the test event returned with error code 1

Related issues

Related to Access to Memory (AtoM) - Task #13533: Do not install composer dependencies with root user (docu... New 06/19/2021

History

#1 Updated by José Raddaoui Marín 7 months ago

  • Subject changed from Unit tests fail on Docker and it's not easy to get coverage reports to Unit tests fail on Docker
  • Description updated (diff)
  • Assignee deleted (José Raddaoui Marín)
  • Target version deleted (Release 2.7.0)

The failing test is checking that a file owned and readable only by root fails to import ...

https://github.com/artefactual/atom/blob/qa/2.x/test/phpunit/PhysicalobjectCsvImporterTest.php#L259-L264
https://github.com/artefactual/atom/blob/qa/2.x/test/phpunit/PhysicalobjectCsvImporterTest.php#L66-L69

This raises a bigger issue about the atom and atom_worker containers being run by root in the Docker environment, so I'll move the coverage and PHPUnit upgrade part to a different issue (#13493) and leave this one to decide if we want to address the failing test or the containers user.

#3 Updated by José Raddaoui Marín 4 months ago

  • Related to Task #13530: Create new versions of existing themes with Bootstrap 5 added

#4 Updated by José Raddaoui Marín 4 months ago

  • Related to deleted (Task #13530: Create new versions of existing themes with Bootstrap 5)

#5 Updated by José Raddaoui Marín 4 months ago

  • Related to Task #13533: Do not install composer dependencies with root user (documentation) added

#6 Updated by David Juhasz 4 months ago

  • Status changed from New to QA/Review
  • Target version set to Release 2.7.0
  • Tested version 2.7 added

Fix merged to qa/2.x: 1590d5e02e249c3dc690828beef4a09f6571a1f4

Also available in: Atom PDF