[Ovirt-devel] [patch] oVirt Test Fixes

Mohammed Morsi mmorsi at redhat.com
Thu Aug 14 18:21:35 UTC 2008


Steve Linabery wrote:
> On Wed, Aug 13, 2008 at 06:15:04PM -0400, Mohammed Morsi wrote:
>   
>> Attached is a patch fixing a few things with the build system. Namely  
>> changes in autobuild.sh so that it works with the new changes made for  
>> the selenium integration, and changes to the vm controller, vm  
>> controller test, and permission fixture due to problems caused by recent  
>> changes.
>>
>>  -Mo
>>     
>
>   
>> >From 73b27d4e104b0b23eccefbe50c710c7e0975407c Mon Sep 17 00:00:00 2001
>> From: Mohammed Morsi <mmorsi at redhat.com>
>> Date: Wed, 13 Aug 2008 18:08:01 -0400
>> Subject: [PATCH] fixes to autobuild and tests due to recent changes
>>
>> ---
>>  autobuild.sh                                  |    5 +-
>>  wui/src/app/controllers/vm_controller.rb      |    3 +-
>>  wui/src/test/fixtures/permissions.yml         |  100 ++++++++++++++++++++++++-
>>  wui/src/test/functional/vm_controller_test.rb |    4 +-
>>  4 files changed, 105 insertions(+), 7 deletions(-)
>>
>> diff --git a/autobuild.sh b/autobuild.sh
>> index b565404..cb27221 100755
>> --- a/autobuild.sh
>> +++ b/autobuild.sh
>> @@ -77,10 +77,11 @@ fi
>>  $ssh_cmd \
>>    "sed -i -e \"s/KrbMethodNegotiate on/KrbMethodNegotiate off/g\" \
>>            -e \"s/KrbMethodK5Passwd off/KrbMethodK5Passwd on/g\" \
>> -          /etc/httpd/conf.d/ovirt-wui.conf"
>> +          /etc/httpd/conf.d/ovirt-wui.conf && \
>> +   service httpd restart"
>>  
>>  echo "Running the wui tests"
>>  $ssh_cmd \
>> -    "curl -i --negotiate -u : management.priv.ovirt.org/ovirt/ | \
>> +    "curl -i http://admin:ovirt@management.priv.ovirt.org/ovirt/ | \
>>     
>
> This doesn't work. You'll just get a 302 redirect to http://management.priv.ovirt.org/ovirt/login/login.
>   

I'm not fully sure I see why its not working. If I understand our new 
auth setup correctly, apache is still using kerberos to authenticate the 
user via the ticket / negotiation method, and falling back to kerberos 
basic auth if it can't. So long as the username:pass is getting to the 
server, eg there isn't a rewrite (which I removed with my last patch), 
apache should accept and authenticate the user with the credentials. 
Admitedly, I couldn't get this to work 100% so in autobuild I disable 
the kerberos negotiation method and everything works like a charm (once 
httpd is restarted, part of this patch). If this is not working, then 
one of these steps must be failing.

> There may be a way to make curl negotiate this, but I tried
> curl -c /tmp/cookies-file --include --location --location-trusted --user admin:ovirt    'http://management.priv.ovirt.org/ovirt/'
> without success.
>
> This does work:
> lynx -dump -accept-all-cookies -auth=admin:ovirt 'http://management.priv.ovirt.org/ovirt/'
> but lynx exit status is zero, even for things like 404 errors...
>
>   
>>         grep 'HTTP/1.1 200 OK' && \
>>     
>
> ...I see, however, that you're parsing the output and not depending on the exit status. Not sure how to make lynx output the response headers, or even if lynx is something you'd want to use.
>   

We can do either or, whatever works, so long as we're verifying that the 
site is up. As a matter of fact we might be able to skip this curl test 
and just rely on selenium to do that (since the selenium server will be 
running on the host, even better), but we still will run into the 
aformentioned issue of logging in the admin user in an automated fashion 
via a un / pass.


   -Mo




More information about the ovirt-devel mailing list