Skip to content

Commit

Permalink
manifest: check that no ownership is set in files and dirs
Browse files Browse the repository at this point in the history
Make sure no ownership is set for any of the directories and files
created in all the test scenarios.
  • Loading branch information
achilleas-k committed Sep 5, 2024
1 parent 9152156 commit 9c03902
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/manifest/subscription_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,17 @@ func TestSubscriptionService(t *testing.T) {
assert.Equal(dirs, tc.expectedDirs)
assert.Equal(files, tc.expectedFiles)
assert.Equal(services, tc.expectedServices)

// ensure no directories or files have non-nil ownership
for _, file := range files {
assert.Nil(file.User())
assert.Nil(file.Group())
}

for _, dir := range dirs {
assert.Nil(dir.User())
assert.Nil(dir.Group())
}
})
}
}
Expand Down

0 comments on commit 9c03902

Please sign in to comment.