Skip to content

Commit f1620de

Browse files
FIX (deploy): Create data and temp folders in CI \ CD to avoid tests failing
1 parent e6ce32b commit f1620de

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.github/workflows/ci-release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ jobs:
159159
# Wait for MinIO
160160
timeout 60 bash -c 'until nc -z localhost 9000; do sleep 2; done'
161161
162+
- name: Create data and temp directories
163+
run: |
164+
# Create directories that are used for backups and restore
165+
# These paths match what's configured in config.go
166+
mkdir -p postgresus-data/backups
167+
mkdir -p postgresus-data/temp
168+
162169
- name: Install PostgreSQL client tools
163170
run: |
164171
chmod +x backend/tools/download_linux.sh

backend/internal/features/storages/models/local/model.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"os"
88
"path/filepath"
99
"postgresus-backend/internal/config"
10-
files_utils "postgresus-backend/internal/util/files"
1110

1211
"github.com/google/uuid"
1312
)
@@ -134,14 +133,6 @@ func (l *LocalStorage) Validate() error {
134133
}
135134

136135
func (l *LocalStorage) TestConnection() error {
137-
err := files_utils.EnsureDirectories([]string{
138-
config.GetEnv().TempFolder,
139-
config.GetEnv().DataFolder,
140-
})
141-
if err != nil {
142-
return fmt.Errorf("failed to ensure directories: %w", err)
143-
}
144-
145136
testFile := filepath.Join(config.GetEnv().TempFolder, "test_connection")
146137
f, err := os.Create(testFile)
147138
if err != nil {

0 commit comments

Comments
 (0)