Problem/Motivation

\Drupal\Tests\Composer\Plugin\Scaffold\Functional\ManageGitIgnoreTest::testUnmanagedGitIgnoreWhenGitNotAvailable() uses core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/scripts/disable-git-bin/git to disable git. It's a pretty odd to have test chmod a file that we keep in git. It makes hard to ensure this file is kept as 644 as it should be. Currently it is 755 in git.

Steps to reproduce

ls -lah core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/scripts/disable-git-bin/git          Thu  7 Oct 13:09:45 2021
-rwxr-xr-x  1 alex  admin    21B  7 Oct 13:03 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/scripts/disable-git-bin/git*

Proposed resolution

Don't store this script as a file. Write the file out ourselves in the test.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3241318-2.patch1.46 KBalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
1.46 KB
andypost’s picture

++ to security, wil buggy Apache 2.4.49 it could be serious

greg.1.anderson’s picture

Status: Needs review » Reviewed & tested by the community

I'm not sure why the chmod is done at all, since +x is a mode that git can track. I agree that the proposed solution is better, though.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 3241318-2.patch, failed testing. View results

andypost’s picture

Status: Needs work » Reviewed & tested by the community

flacky test

  • catch committed 2c7e767 on 9.3.x
    Issue #3241318 by alexpott: core/tests/Drupal/Tests/Composer/Plugin/...

  • catch committed b0c9000 on 9.2.x
    Issue #3241318 by alexpott: core/tests/Drupal/Tests/Composer/Plugin/...
catch’s picture

Version: 9.3.x-dev » 9.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.3.x and cherry-picked to 9.2.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.