ACK with a small note about the commit message (inline)
Thomas
On 03/09/2011 12:31 PM, mtaylor@redhat.com wrote:
From: Martyn Taylormtaylor@redhat.com
Tests run over SSH to remote installation of aeolus-configure
example: rake spec hostname="testing" username="root" password="password"
Options: hostname - default localhost username - default root password - no default
You can avoid passing password as an argument by adding your ssh public key to the authorized_hosts file on your test machine
will be ignored, and an empty message aborts the commit.
This line ^ looks like it was was left here by accident.
spec/verify_install_spec.rb | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) create mode 100644 spec/verify_install_spec.rb
diff --git a/spec/verify_install_spec.rb b/spec/verify_install_spec.rb new file mode 100644 index 0000000..1ea5d27 --- /dev/null +++ b/spec/verify_install_spec.rb @@ -0,0 +1,36 @@ +require 'spec_helper' +require 'net/ssh'
+describe "aeolus-configure install" do
- before(:each) do
- @username = "#{ENV['username']}".empty? ? "root" : "#{ENV['username']}"
- @hostname = "#{ENV['hostname']}".empty? ? "localhost" : "#{ENV['hostname']}"
- @password = "#{ENV['password']}".empty? ? nil : "#{ENV['password']}"
- end
- it "should install all aeolus packages" do
- stdout = ""
- Net::SSH.start(@hostname, @username, :password => @password) do |ssh|
ssh.exec!("rpm -qa | grep aeolus") do |channel, stream, data|
stdout<< data if stream == :stdout
end
- end
- stdout.include?("aeolus-conductor-doc").should == true
- stdout.include?("aeolus-conductor").should == true
- stdout.include?("aeolus-conductor-daemons").should == true
- stdout.include?("aeolus-configure").should == true
- end
- it "should start all aeolus services" do
- stdout = ""
- Net::SSH.start(@hostname, @username, :password => @password) do |ssh|
["aeolus-conductor", "aeolus-conductor", "iwhd", "conductor-dbomatic", "conductor-condor_refreshd", "postgresql"].each do |service|
ssh.exec!("/etc/init.d/" + service + " status") do |channel, stream, data|
stdout<< data if stream == :stdout
end
stdout.include?("is running").should == true
stdout = ""
end
- end
- end
+end