Example #1
0
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)
}
Example #2
0
File: system.go Project: vosst/csi
// 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
}