E2E tests use repeated strings for test data where constants add no value (#97)

---------

Co-authored-by: Pasha Sviderski <me@psviderski.name>
Co-authored-by: Anton Ovchinnikov <anton@tonyo.info>
This commit is contained in:
Evgenii Orlov
2025-07-21 19:30:02 +02:00
committed by GitHub
co-authored by Pasha Sviderski Anton Ovchinnikov
parent 6fb07db4b2
commit da3634b690
56 changed files with 170 additions and 116 deletions
+4 -3
View File
@@ -3,10 +3,11 @@ package machine
import (
"encoding/json"
"fmt"
"github.com/psviderski/uncloud/internal/machine/network"
"os"
"path/filepath"
"sync"
"github.com/psviderski/uncloud/internal/machine/network"
)
const (
@@ -71,7 +72,7 @@ func (c *State) Save() error {
return fmt.Errorf("state path not set")
}
dir, _ := filepath.Split(c.path)
if err := os.MkdirAll(dir, 0711); err != nil {
if err := os.MkdirAll(dir, 0o711); err != nil {
return fmt.Errorf("create state directory %q: %w", dir, err)
}
@@ -79,5 +80,5 @@ func (c *State) Save() error {
if err != nil {
return err
}
return os.WriteFile(c.path, data, 0600)
return os.WriteFile(c.path, data, 0o600)
}