MCPcopy Create free account
hub / github.com/archlinux-de/pkgstats-cli / TestShowSystemArchitecture

Function TestShowSystemArchitecture

cmd/architecture_test.go:48–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

46}
47
48func 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}

Callers

nothing calls this directly

Calls 3

GetCpuArchitectureMethod · 0.95
NewSystemFunction · 0.92
pkgstatsFunction · 0.85

Tested by

no test coverage detected