installer/utils/nix_install_test.rb in rhoconnect-3.2.0.beta1 vs installer/utils/nix_install_test.rb in rhoconnect-3.2.0.beta2

- old
+ new

@@ -58,31 +58,31 @@ channel = build_type # Append the rest of the file name according to distribution if @user == 'ubuntu' - @dist = { :flavor => "ubuntu", - :package => "rhoconnect_#{Constants::RC_VERSION}_all.deb", - :local_file => "#{local_file}rhoconnect_#{Constants::RC_VERSION}_all.deb", - :pkg_mgr => 'dpkg', - :pkg_type => 'DEB', - :pkg_repo => 'apt-get', - :deps => Constants::DEB_DEPS, + @dist = { :flavor => "ubuntu", + :package => "rhoconnect_#{Constants::RC_VERSION}_all.deb", + :local_file => "#{local_file}rhoconnect_#{Constants::RC_VERSION}_all.deb", + :pkg_mgr => 'dpkg', + :pkg_type => 'DEB', + :pkg_repo => 'apt-get', + :deps => Constants::DEB_DEPS, :repo_src_file => '/etc/apt/sources.list', - :repo_str => '\n' + + :repo_str => '\n' + '# This is the repository for rhoconnect packages\n' + "deb http://#{BUCKET}.s3.amazonaws.com/#{channel}/deb rhoconnect main" } elsif @user == 'root' - @dist = { :flavor => "centos", - :package => "rhoconnect-#{Constants::RC_VERSION}.noarch.rpm", - :local_file => "#{local_file}rhoconnect-#{Constants::RC_VERSION}.noarch.rpm", - :pkg_mgr => 'rpm', - :pkg_type => 'RPM', - :pkg_repo => 'yum', - :deps => Constants::RPM_DEPS, + @dist = { :flavor => "centos", + :package => "rhoconnect-#{Constants::RC_VERSION}.noarch.rpm", + :local_file => "#{local_file}rhoconnect-#{Constants::RC_VERSION}.noarch.rpm", + :pkg_mgr => 'rpm', + :pkg_type => 'RPM', + :pkg_repo => 'yum', + :deps => Constants::RPM_DEPS, :repo_src_file => '/etc/yum.repos.d/rhoconnect.repo', - :repo_str => '[rhoconnect]\n' + + :repo_str => '[rhoconnect]\n' + 'name=Rhoconnect\n' + "baseurl=http://#{BUCKET}.s3.amazonaws.com/#{channel}/rpm" + '\nenabled=1\n' + 'gpgcheck=0\n' } @@ -101,11 +101,12 @@ # get_access_keys # Retrieves the access key and secret access key from the above specified file. def get_access_keys lines = IO.readlines Constants::ACCESS_KEY_FILE - @access_key = lines.first.strip.split("=")[1] + + @access_key = lines.first.strip.split("=")[1] @secret_access_key = lines.last.strip.split("=")[1] end #get_access_keys # make_fog # Generates the Fog object used to create the new ec2 instance. @@ -221,16 +222,15 @@ puts "Host: #{@host}" puts "Checking RC service." request = nil #Defined outside block as to not limit the scope of request to the do block. 2.times do - request = Net::HTTP.get_response(@host, '/') + request = Net::HTTP.get_response(@host, '/console/') end #do puts "Code: #{request.code} Message: #{request.message}" - if request.code == '200' or - request.code == '302' + if request.code.to_s < '400' puts "Rhoconnect service up!" else puts "Failed to connect to rhoconnect service." exit 13 end #if