From 169fb2347ac63cf3a105bd65589fc982577d07e2 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 18 Feb 2019 17:00:57 +0100 Subject: [PATCH] Avoid issues with git signatures when running tests --- .../Test/Package/Archiver/ArchivableFilesFinderTest.php | 1 + tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php b/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php index f6afe10f1..cea4088b1 100644 --- a/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php +++ b/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php @@ -189,6 +189,7 @@ class ArchivableFilesFinderTest extends TestCase 'git init && '. 'git config user.email "you@example.com" && '. 'git config user.name "Your Name" && '. + 'git config commit.gpgsign false && '. 'git add .git* && '. 'git commit -m "ignore rules" && '. 'git add . && '. diff --git a/tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php b/tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php index 714c9b923..45a635437 100644 --- a/tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php +++ b/tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php @@ -125,6 +125,12 @@ class ArchiveManagerTest extends ArchiverTest throw new \RuntimeException('Could not config: '.$this->process->getErrorOutput()); } + $result = $this->process->execute('git config commit.gpgsign false', $output, $this->testDir); + if ($result > 0) { + chdir($currentWorkDir); + throw new \RuntimeException('Could not config: '.$this->process->getErrorOutput()); + } + $result = $this->process->execute('git config user.name "Your Name"', $output, $this->testDir); if ($result > 0) { chdir($currentWorkDir);