Skip to content

Commit 003b9b9

Browse files
Create workspace root directory in tests if missing
- Ensure workspaceRoot directory exists before moving test repos - Fixes integration test failures when directory doesn't exist Co-authored-by: Manuel Kießling <manuel@kiessling.net>
1 parent 993ff8a commit 003b9b9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tests/Integration/WorkspaceMgmt/WorkspaceGitServiceTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ private function createTestWorkspace(): Workspace
156156
self::assertNotNull($workspaceId);
157157

158158
// Move test repo to the workspace root location
159+
if (!is_dir($this->workspaceRoot)) {
160+
mkdir($this->workspaceRoot, 0777, true);
161+
}
162+
159163
$targetPath = $this->workspaceRoot . '/' . $workspaceId;
160164
if (is_dir($targetPath)) {
161165
$this->removeDirectory($targetPath);

tests/Integration/WorkspaceMgmt/WorkspaceMgmtFacadeGitInfoTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ private function createTestWorkspace(): Workspace
213213
self::assertNotNull($workspaceId);
214214

215215
// Move test repo to the workspace root location
216+
if (!is_dir($this->workspaceRoot)) {
217+
mkdir($this->workspaceRoot, 0777, true);
218+
}
219+
216220
$targetPath = $this->workspaceRoot . '/' . $workspaceId;
217221
if (is_dir($targetPath)) {
218222
$this->removeDirectory($targetPath);

0 commit comments

Comments
 (0)