Skip to content

Commit

Permalink
fix output directory for Drupal 11.x tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WengerK committed Aug 20, 2024
1 parent 6f7677b commit b04ac74
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions 11/11.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# Copy a default template for PHPUnit testing.
COPY templates/phpunit.xml /opt/drupal/web/phpunit.xml

# Create the output directory for PHPUnit.
RUN mkdir -p /opt/drupal/web/sites/default/files/simpletest/browser_output
RUN chown www-data:www-data /opt/drupal/web/sites/default/files/simpletest/browser_output
2 changes: 1 addition & 1 deletion 11/11.0/templates/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
overridden by the value set for the "BROWSERTEST_OUTPUT_DIRECTORY"
environment variable.
-->
<parameter name="outputDirectory" value="sites/simpletest/browser_output"/>
<parameter name="outputDirectory" value="/opt/drupal/web/sites/default/files/simpletest/browser_output"/>
<!-- By default browser tests print the individual links in the test run
report. To avoid overcrowding the output in CI environments, you can
set the "verbose" parameter or the "BROWSERTEST_OUTPUT_VERBOSE"
Expand Down
3 changes: 3 additions & 0 deletions 11/11.0/tests/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ commandTests:
command: 'phpunit'
args: ['-c', '/var/www/html/phpunit.xml']
exitCode: 0
expectedOutput: [ 'No tests executed!' ]
excludedOutput: [ 'is not a writable directory.' ]
fileExistenceTests:
- name: 'Root'
path: '/'
Expand Down Expand Up @@ -70,3 +72,4 @@ fileExistenceTests:
permissions: 'drwxr-xr-x'
uid: 33
gid: 33

4 changes: 4 additions & 0 deletions 11/11.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# Copy a default template for PHPUnit testing.
COPY templates/phpunit.xml /opt/drupal/web/phpunit.xml

# Create the output directory for PHPUnit.
RUN mkdir -p /opt/drupal/web/sites/default/files/simpletest/browser_output
RUN chown www-data:www-data /opt/drupal/web/sites/default/files/simpletest/browser_output
2 changes: 1 addition & 1 deletion 11/11.1/templates/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
overridden by the value set for the "BROWSERTEST_OUTPUT_DIRECTORY"
environment variable.
-->
<parameter name="outputDirectory" value="sites/simpletest/browser_output"/>
<parameter name="outputDirectory" value="/opt/drupal/web/sites/default/files/simpletest/browser_output"/>
<!-- By default browser tests print the individual links in the test run
report. To avoid overcrowding the output in CI environments, you can
set the "verbose" parameter or the "BROWSERTEST_OUTPUT_VERBOSE"
Expand Down
2 changes: 2 additions & 0 deletions 11/11.1/tests/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ commandTests:
command: 'phpunit'
args: ['-c', '/var/www/html/phpunit.xml']
exitCode: 0
expectedOutput: [ 'No tests executed!' ]
excludedOutput: [ 'is not a writable directory.' ]
fileExistenceTests:
- name: 'Root'
path: '/'
Expand Down

0 comments on commit b04ac74

Please sign in to comment.