Exemplo n.º 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)
}
Exemplo n.º 2
0
Arquivo: system.go Projeto: 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
}