test_attacker_baremetal: don't run local commands 69/37469/4
authorRoss Brattain <ross.b.brattain@intel.com>
Fri, 14 Jul 2017 06:03:46 +0000 (23:03 -0700)
committerRoss Brattain <ross.b.brattain@intel.com>
Fri, 14 Jul 2017 06:25:55 +0000 (23:25 -0700)
commitaa195b8e742556b422cf5583c3b531ec1b58ebdc
treecaeff5097810317e7f230a97af618b0657a617f0
parent3f1a658fce4b3d81fa2b15ab1879fd37aad80760
test_attacker_baremetal: don't run local commands

these tests were failing to mock subprocess.check_output
and thus were trying to run sudo commands on the local
system.

This is dangerous.  Add the subprocess mock.

Also mock the LOG object so we don't print
bogus Runtime error tracebacks in the unittest logs
when we test assertRaises()

Change-Id: I01535f9952fbd95ce2f5972b641c51ff836e7e8c
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
tests/unit/benchmark/scenarios/availability/test_attacker_baremetal.py
yardstick/benchmark/scenarios/availability/attacker/attacker_baremetal.py