From: Martyn Taylor mtaylor@redhat.com
--- .loadpath | 5 +++++ .project | 17 +++++++++++++++++ spec/verify_install_spec.rb | 30 ++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 0 deletions(-) create mode 100644 .loadpath create mode 100644 .project
diff --git a/.loadpath b/.loadpath new file mode 100644 index 0000000..9a62220 --- /dev/null +++ b/.loadpath @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<loadpath> + <pathentry path="" type="src"/> + <pathentry path="org.rubypeople.rdt.launching.RUBY_CONTAINER" type="con"/> +</loadpath> diff --git a/.project b/.project new file mode 100644 index 0000000..a298967 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>conf</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.rubypeople.rdt.core.rubybuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.rubypeople.rdt.core.rubynature</nature> + </natures> +</projectDescription> diff --git a/spec/verify_install_spec.rb b/spec/verify_install_spec.rb index 1ea5d27..83e2004 100644 --- a/spec/verify_install_spec.rb +++ b/spec/verify_install_spec.rb @@ -33,4 +33,34 @@ describe "aeolus-configure install" do end end end + + it "should correctly create an aeolus templates bucket" do + stdout = "" + Net::SSH.start(@hostname, @username, :password => @password) do |ssh| + ssh.exec!("/usr/bin/curl -X GET http://localhost:9090") do |channel, stream, data| + stdout << data if stream == :stdout + end + end + stdout.include?("http://localhost:9090/templates%22).should == true + end + + it "should create a site admin for aeolus conductor" do + stdout = "" + Net::SSH.start(@hostname, @username, :password => @password) do |ssh| + ssh.exec!("echo 'RAILS_ENV="production"' > /tmp/check_admin.rb") + ssh.exec!("echo 'require "/usr/share/aeolus-conductor/config/environment"' >> /tmp/check_admin.rb") + ssh.exec!("echo 'user=User.find(:all, :conditions => {:login => "admin"}).first' >> /tmp/check_admin.rb") + ssh.exec!("echo 'puts "email=" + user.email' >> /tmp/check_admin.rb") + ssh.exec!("echo 'puts "first_name=" + user.first_name' >> /tmp/check_admin.rb") + ssh.exec!("echo 'puts "last_name=" + user.last_name' >> /tmp/check_admin.rb") + ssh.exec!("ruby /tmp/check_admin.rb") do |channel, stream, data| + stdout << data if stream == :stdout + end + stdout.include?("email=dcuser@aeolusproject.org").should == true + stdout.include?("first_name=aeolus").should == true + stdout.include?("last_name=user").should == true + ssh.exec!("rm -f /tmp/check_admin.rb") + end + end + end
aeolus-devel@lists.fedorahosted.org