func TestSystemReturnsCorrectArch(t *testing.T) { system := System{&Dpkg{"test_data"}} arch, err := system.Arch() assert.Nil(t, err) assert.Equal(t, pkg.Arch("beautiful"), arch) }
// Arch queries the system architecture that the system has been built for. // // Returns an error if querying the information from the system fails. func (self System) Arch() (pkg.Arch, error) { arch, err := self.dpkg.Architecture() return pkg.Arch(arch), err }