(t *testing.T)
| 46 | } |
| 47 | |
| 48 | func TestShowSystemArchitecture(t *testing.T) { |
| 49 | output, err := pkgstats(t, []string{"architecture", "system"}) |
| 50 | if err != nil { |
| 51 | t.Fatalf("Failed to run command: %v", err) |
| 52 | } |
| 53 | |
| 54 | s := system.NewSystem() |
| 55 | cpuArchitecture, err := s.GetCpuArchitecture() |
| 56 | if err != nil { |
| 57 | t.Fatal(err) |
| 58 | } |
| 59 | |
| 60 | if strings.TrimSpace(output) != cpuArchitecture { |
| 61 | t.Fatalf("Expected CPU architecture %s, but got %s", cpuArchitecture, strings.TrimSpace(output)) |
| 62 | } |
| 63 | } |
nothing calls this directly
no test coverage detected