From b4a1ab1239f4731313f965214f55d5dab493d4f4 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sat, 13 Mar 2021 21:52:59 +0100 Subject: [PATCH] add patch for testing library 3.0.0 to < 7.2.0 --- CHANGELOG.md | 8 ++++++++ README.md | Bin 0 -> 424 bytes composer.json | 34 ++++++++++++++++++++++++++++++++++ sudolesstests.patch | 25 +++++++++++++++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 README.md create mode 100644 composer.json create mode 100644 sudolesstests.patch diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0a6bca4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog +All notable changes to this project will be documented in this file. + +--- + +## 1.0.0.0 (2015-12-16) +### Added +- patch für Testing Library 3.0.0.0 to < 7.2.0 diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8e313ddfbecd3469f1a7c066f3ca6d216f5ac2e0 GIT binary patch literal 424 zcmbV}O%8%E6ohBZDVngZE!A_fKyAQ03|S5lP5l>1~{U?WSb|pN+_5bF>-YD zBb)k(wbh<82Qsfa=X+Qd)4qAu=5Eq!Grv`rw^iu3FgQ3G)TVzhnPnjQZ?{Lk(+)ll i_q-=iPdbyvU+mvr8a!KR`SCL`$L!ntHj3<3a_a@CU`&z# literal 0 HcmV?d00001 diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..ccda70f --- /dev/null +++ b/composer.json @@ -0,0 +1,34 @@ +{ + "name": "d3/sudolesstests", + "description": "run OXID tests on restricted servers like managed hosting", + "type": "library", + "keywords": [ + "oxid", + "eShop", + "d3", + "tests", + "sudo" + ], + "authors": [ + { + "name": "D3 Data Development (Inh. Thomas Dartsch)", + "email": "info@shopmodule.com", + "homepage": "https://www.d3data.de" + } + ], + "homepage": "https://www.oxidmodule.com/", + "license": [ + "GPL-3.0-or-later" + ] + "require": { + "oxid-esales/testing-library": ">= 3 < 7.2.0", + "cweagans/composer-patches": "^1.6" + }, + "extra": { + "patches": { + "oxid-esales/testing-library": { + "don't use sudo while test run on restricted servers": "https://git.d3data.de/D3Public/d3sudolesstests/raw/branch/rel_1.0.x/sudolesstests.patch" + } + } + } +} diff --git a/sudolesstests.patch b/sudolesstests.patch new file mode 100644 index 0000000..c4137f7 --- /dev/null +++ b/sudolesstests.patch @@ -0,0 +1,25 @@ +From c9349fd1f8b96474585519fd229d687213570eea Mon Sep 17 00:00:00 2001 +From: Daniel Seifert +Date: Sat, 13 Mar 2021 00:52:13 +0100 +Subject: [PATCH 1/1] remove sudo for test execution on restricted servers + +--- + library/Services/Library/Cache.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/library/Services/Library/Cache.php b/library/Services/Library/Cache.php +index 12391cf..c2d28db 100644 +--- a/library/Services/Library/Cache.php ++++ b/library/Services/Library/Cache.php +@@ -44,7 +44,7 @@ class Cache + public function clearTemporaryDirectory() + { + if ($sCompileDir = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\ConfigFile::class)->getVar('sCompileDir')) { +- CliExecutor::executeCommand("sudo chmod 777 -R $sCompileDir"); ++ CliExecutor::executeCommand("chmod 777 -R $sCompileDir"); + $this->removeTemporaryDirectory($sCompileDir, false); + } + } +-- +2.25.1 +