(t *testing.T)
| 29 | } |
| 30 | |
| 31 | func TestShowOsArchitecture(t *testing.T) { |
| 32 | output, err := pkgstats(t, []string{"architecture", "os"}) |
| 33 | if err != nil { |
| 34 | t.Fatalf("Failed to run command: %v", err) |
| 35 | } |
| 36 | |
| 37 | s := system.NewSystem() |
| 38 | osArchitecture, err := s.GetArchitecture() |
| 39 | if err != nil { |
| 40 | t.Fatal(err) |
| 41 | } |
| 42 | |
| 43 | if strings.TrimSpace(output) != osArchitecture { |
| 44 | t.Fatalf("Expected OS architecture %s, but got %s", osArchitecture, strings.TrimSpace(output)) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func TestShowSystemArchitecture(t *testing.T) { |
| 49 | output, err := pkgstats(t, []string{"architecture", "system"}) |
nothing calls this directly
no test coverage detected