inspec/test/unit/resource_processes_test.rb

29 lines
569 B
Ruby
Raw Normal View History

# encoding: utf-8
2015-10-06 16:55:44 +00:00
# author: Christoph Hartmann
# author: Dominik Richter
require 'helper'
require 'vulcano/resource'
describe 'Vulcano::Resources::Processes' do
2015-09-22 16:31:21 +00:00
let(:resource) { load_resource('processes', '/bin/bash') }
2015-09-22 16:33:05 +00:00
it 'verify processes resource' do
_(resource.list).must_equal [{
user: 'root',
pid: '1',
cpu: '0.0',
mem: '0.0',
vsz: '18084',
rss: '3228',
tty: '?',
stat: 'Ss',
start: '14:15',
time: '0:00',
command: '/bin/bash'
}]
2015-09-22 16:33:05 +00:00
_(resource.list.length).must_equal 1
end
end