Skip to content

Commit cc8842d

Browse files
committed
Get UID/GID for current user in write file_test.go
1 parent e4876a6 commit cc8842d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pkg/applyinator/file_test.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ func TestWriteContentToFile(t *testing.T) {
2121

2222
getFile := func(path string, permissions string, content string) File {
2323
return File{
24-
Permissions: permissions,
25-
Path: filepath.Join(tempDir, path),
2624
Content: content,
25+
UID: -1,
26+
GID: -1,
27+
Path: filepath.Join(tempDir, path),
28+
Permissions: permissions,
2729
}
2830
}
2931

@@ -157,8 +159,10 @@ func TestCreateDirectory(t *testing.T) {
157159
getFile := func(path string, permissions string) File {
158160
return File{
159161
Directory: true,
160-
Permissions: permissions,
162+
UID: -1,
163+
GID: -1,
161164
Path: filepath.Join(tempDir, path),
165+
Permissions: permissions,
162166
}
163167
}
164168

0 commit comments

Comments
 (0)