Module: PSWindows::Pkg

Includes:
Beaker::CommandFactory
Included in:
Host
Defined in:
lib/beaker/host/pswindows/pkg.rb

Instance Attribute Summary

Attributes included from Beaker::CommandFactory

#assertions

Instance Method Summary collapse

Methods included from Beaker::CommandFactory

#execute, #fail_test

Instance Method Details

#check_for_command(name) ⇒ Object



4
5
6
7
# File 'lib/beaker/host/pswindows/pkg.rb', line 4

def check_for_command(name)
  result = exec(Beaker::Command.new("where #{name}"), :accept_all_exit_codes => true)
  result.exit_code == 0
end

#check_for_package(_name) ⇒ Object



9
10
11
12
13
# File 'lib/beaker/host/pswindows/pkg.rb', line 9

def check_for_package(_name)
  # HACK: NOOP
  # raise "Cannot check for package #{name} on #{self}"
  0
end

#determine_if_x86_64Boolean

Examine the host system to determine the architecture, overrides default host determine_if_x86_64 so that wmic is used

Returns:

  • (Boolean)

    true if x86_64, false otherwise



29
30
31
# File 'lib/beaker/host/pswindows/pkg.rb', line 29

def determine_if_x86_64
  identify_windows_architecture.include?('64')
end

#install_package(_name, _cmdline_args = '') ⇒ Object



15
16
17
18
19
# File 'lib/beaker/host/pswindows/pkg.rb', line 15

def install_package(_name, _cmdline_args = '')
  # HACK: NOOP
  # raise "Package #{name} cannot be installed on #{self}"
  0
end

#uninstall_package(_name, _cmdline_args = '') ⇒ Object



21
22
23
24
25
# File 'lib/beaker/host/pswindows/pkg.rb', line 21

def uninstall_package(_name, _cmdline_args = '')
  # HACK: NOOP
  # raise "Package #{name} cannot be uninstalled on #{self}"
  0
end