Skip to content

Commit 4ab549f

Browse files
committed
Fix lint issues in file tests
1 parent 3986c24 commit 4ab549f

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

providers/os/resources/file.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,6 @@ func (s *mqlFile) loadOwnership(path string) error {
178178
return s.cacheOwnership(*stat)
179179
}
180180

181-
func (s *mqlFile) stat() error {
182-
return s.loadOwnership(s.Path.Data)
183-
}
184-
185181
func (s *mqlFile) size(path string) (int64, error) {
186182
_, exists, err := s.loadStatFields(path)
187183
if err != nil {

providers/os/resources/file_internal_test.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ func newSudoCatConnection(t *testing.T) *sudoCatConnection {
6969
}
7070
}
7171

72-
func (c *sudoCatConnection) ID() uint32 { return 0 }
73-
func (c *sudoCatConnection) ParentID() uint32 { return 0 }
74-
func (c *sudoCatConnection) Name() string { return "sudo-cat-test" }
75-
func (c *sudoCatConnection) Type() shared.ConnectionType { return shared.Type_SSH }
76-
func (c *sudoCatConnection) Asset() *inventory.Asset { return c.asset }
77-
func (c *sudoCatConnection) UpdateAsset(asset *inventory.Asset) { c.asset = asset }
78-
func (c *sudoCatConnection) Capabilities() shared.Capabilities { return shared.Capability_File | shared.Capability_RunCommand }
72+
func (c *sudoCatConnection) ID() uint32 { return 0 }
73+
func (c *sudoCatConnection) ParentID() uint32 { return 0 }
74+
func (c *sudoCatConnection) Name() string { return "sudo-cat-test" }
75+
func (c *sudoCatConnection) Type() shared.ConnectionType { return shared.Type_SSH }
76+
func (c *sudoCatConnection) Asset() *inventory.Asset { return c.asset }
77+
func (c *sudoCatConnection) UpdateAsset(asset *inventory.Asset) { c.asset = asset }
78+
func (c *sudoCatConnection) Capabilities() shared.Capabilities {
79+
return shared.Capability_File | shared.Capability_RunCommand
80+
}
7981
func (c *sudoCatConnection) RunCommand(command string) (*shared.Command, error) {
8082
return c.runner.RunCommand(command)
8183
}

0 commit comments

Comments
 (0)