Remove invalid keystone test code

This code removes the authentication code that is
not using keystone.

I could not get the code to work when things were configured to
use keystone and found that the tests still worked if I removed the
code.
This commit is contained in:
Dan Bode
2012-06-12 19:32:16 -07:00
parent 75889ab7fc
commit bdf67a91aa

View File

@@ -12,40 +12,40 @@ proxy_local_net_ip='127.0.0.1'
user='openstack:admin' user='openstack:admin'
password='admin_password' password='admin_password'
# headers for curl requests ## headers for curl requests
user_header="-H 'X-Storage-User: #{user}'" #user_header="-H 'X-Storage-User: #{user}'"
password_header="-H 'X-Storage-Pass: #{password}'" #password_header="-H 'X-Storage-Pass: #{password}'"
get_cred_command="curl -k -v #{user_header} #{password_header} http://#{proxy_local_net_ip}:5000/v2.0/" #get_cred_command="curl -k -v #{user_header} #{password_header} http://#{proxy_local_net_ip}:5000/v2.0/"
#
# verify that we can retrive credentials from our user ## verify that we can retrive credentials from our user
result_hash = {} #result_hash = {}
puts "getting credentials: #{get_cred_command}" #puts "getting credentials: #{get_cred_command}"
Open3.popen3(get_cred_command) do |stdin, stdout, stderr| #Open3.popen3(get_cred_command) do |stdin, stdout, stderr|
result_hash[:stderr] = stderr.read # result_hash[:stderr] = stderr.read
result_hash[:stderr].split("\n").each do |line| # result_hash[:stderr].split("\n").each do |line|
if line =~ /^< HTTP\/\d\.\d (\d\d\d)/ # if line =~ /^< HTTP\/\d\.\d (\d\d\d)/
result_hash[:status_code]=$1 # result_hash[:status_code]=$1
end # end
if line =~ /< X-Storage-Url: (http\S+)/ # if line =~ /< X-Storage-Url: (http\S+)/
result_hash[:auth_url]=$1 # result_hash[:auth_url]=$1
end # end
if line =~ /< X-Storage-Token: (AUTH_\S+)/ # if line =~ /< X-Storage-Token: (AUTH_\S+)/
result_hash[:auth_token]=$1 # result_hash[:auth_token]=$1
end # end
end # end
end #end
raise(Exception, "Call to get auth tokens failed:\n#{result_hash[:stderr]}") unless result_hash[:status_code] == '200' #raise(Exception, "Call to get auth tokens failed:\n#{result_hash[:stderr]}") unless result_hash[:status_code] == '200'
#
# verify that the credentials are valid ## verify that the credentials are valid
auth_token_header="-H 'X-Auth-Token: #{result_hash[:auth_token]}'" #auth_token_header="-H 'X-Auth-Token: #{result_hash[:auth_token]}'"
puts auth_token_header #puts auth_token_header
get_account_head="curl -k -v #{auth_token_header} #{result_hash[:auth_url]}" #get_account_head="curl -k -v #{auth_token_header} #{result_hash[:auth_url]}"
# what is the expected code? ## what is the expected code?
puts "verifying connection auth: #{get_account_head}" #puts "verifying connection auth: #{get_account_head}"
Open3.popen3(get_account_head) do |stdin, stdout, stderr| #Open3.popen3(get_account_head) do |stdin, stdout, stderr|
#puts stdout.read # #puts stdout.read
#puts stderr.read # #puts stderr.read
end #end
swift_command_prefix="swift -A http://#{proxy_local_net_ip}:5000/v2.0/ -V 2 -U #{user} -K #{password}" swift_command_prefix="swift -A http://#{proxy_local_net_ip}:5000/v2.0/ -V 2 -U #{user} -K #{password}"