Skip to content

Instantly share code, notes, and snippets.

@retr0h
Created October 25, 2010 21:48
Show Gist options
  • Save retr0h/645848 to your computer and use it in GitHub Desktop.
Save retr0h/645848 to your computer and use it in GitHub Desktop.
##
# StackScript
# https://www.linode.com/stackscripts/view/?StackScriptID=1380
require "rubygems"
require "rye"
require "minitest/spec"
MiniTest::Unit.autorun
Rbox = Rye::Box.new("host1.example.com")
Rbox.disable_safe_mode
describe "StackScripts" do
describe "System Tools" do
describe "PACKAGES" do
it "installed the packages" do
Packages = %w(
ack-grep gdb htop mtr netcat screen smem socat telnet tree man-db curl wget zsh strace ltrace lsof sysstat whois manpages rsync dnsutils sudo
)
Packages.each do |package|
@topic = Rbox.execute "dpkg -l #{package}"
@topic.exit_status.must_equal 0
end
end
end
describe "enable" do
it "enabled sysstat" do
@topic = Rbox.execute 'grep ENABLED=\"true\" /etc/default/sysstat'
@topic.exit_status.must_equal 0
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment