fix: handle new lines and spaces in the secret files

This commit is contained in:
Stavros
2025-04-10 15:34:46 +03:00
parent 1169c633cc
commit 8a21345706
2 changed files with 30 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
package utils_test
import (
"fmt"
"os"
"reflect"
"testing"
@@ -123,7 +124,7 @@ func TestGetSecret(t *testing.T) {
expected := "test"
// Create file
err := os.WriteFile(file, []byte(expected), 0644)
err := os.WriteFile(file, []byte(fmt.Sprintf("\n\n \n\n\n %s \n\n \n ", expected)), 0644)
// Check if there was an error
if err != nil {