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

Function TestShowOsArchitecture

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

Source from the content-addressed store, hash-verified

29}
30
31func 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
48func TestShowSystemArchitecture(t *testing.T) {
49 output, err := pkgstats(t, []string{"architecture", "system"})

Callers

nothing calls this directly

Calls 3

GetArchitectureMethod · 0.95
NewSystemFunction · 0.92
pkgstatsFunction · 0.85

Tested by

no test coverage detected