Skip to content

Commit

Permalink
Merge branch 'collector_wip' into UDENG-5705-Ubuntu-Insights-Consent-…
Browse files Browse the repository at this point in the history
…Manager
  • Loading branch information
hk21702 committed Jan 16, 2025
2 parents 8dc1c72 + 0571a4c commit de3a14e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/collector/sysinfo/sysinfo.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// package sysinfo allows collecting "common" system information for all insight reports.
// Package sysinfo allows collecting "common" system information for all insight reports.
package sysinfo

type options struct {
Expand Down
9 changes: 9 additions & 0 deletions internal/collector/sysinfo/sysinfo_darwin.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package sysinfo

func (s Manager) collectHardware() (HwInfo, error) {
return HwInfo{}, nil
}

func (s Manager) collectSoftware() (SwInfo, error) {
return SwInfo{}, nil
}
2 changes: 0 additions & 2 deletions internal/collector/sysinfo/sysinfo_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
)

func (s Manager) collectHardware() (hwInfo HwInfo, err error) {

// System vendor
d, err := os.ReadFile(filepath.Join(s.root, "sys/class/dmi/id/sys_vendor"))
if err != nil {
Expand All @@ -20,6 +19,5 @@ func (s Manager) collectHardware() (hwInfo HwInfo, err error) {
}

func (s Manager) collectSoftware() (swInfo SwInfo, err error) {

return swInfo, nil
}
3 changes: 1 addition & 2 deletions internal/collector/sysinfo/sysinfo_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestNew(t *testing.T) {
}{
"Instantiate a sys info manager": {},
}
for name, _ := range tests {
for name := range tests {
t.Run(name, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -56,5 +56,4 @@ func TestCollect(t *testing.T) {
require.Equal(t, want, got, "Collect should return expected sys information")
})
}

}
9 changes: 9 additions & 0 deletions internal/collector/sysinfo/sysinfo_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package sysinfo

func (s Manager) collectHardware() (HwInfo, error) {
return HwInfo{}, nil
}

func (s Manager) collectSoftware() (SwInfo, error) {
return SwInfo{}, nil
}

0 comments on commit de3a14e

Please sign in to comment.