Bug 1317610

Summary: Migrate all the 4.0 tests to use 3.6 sdk code
Product: [Community] ovirt-system-tests Reporter: David Caro <dcaroest>
Component: CoreAssignee: Yaniv Kaul <ykaul>
Status: CLOSED UPSTREAM QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.0CC: bugs, eedri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-03 09:12:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Caro 2016-03-14 16:27:40 UTC
Description of problem:
Right now the 4.0 tests are using the python 4.0 api code and syntax, we should start by migrating them to 3.6 and then once that is stable, start writing the 4.0 ones

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Yaniv Kaul 2016-03-14 18:35:21 UTC
When testing with 3.6 API, things look quite good generally:
> As an experiment, copied the 3.6 API tests over to master, and results are
> pretty good:
> # add_dc:
>   # add_dc: Success (in 0:01:45)
>   # add_dc_quota:
>   # add_dc_quota: Success (in 0:00:01)
>   # add_quota_storage_limits:
>   # add_quota_storage_limits: Success (in 0:00:00)
>   # add_quota_cluster_limits:
>   # add_quota_cluster_limits: Success (in 0:00:00)
>   # add_cluster:
>   # add_cluster: Success (in 0:00:00)
>   # add_hosts:
>   # add_hosts: Success (in 0:01:53)
>   # add_master_storage_domain:
>   # add_master_storage_domain: Success (in 0:01:04)
>   # add_secondary_storage_domains:
>   # add_secondary_storage_domains: Success (in 0:02:09)
>   # import_templates:
>     * Collect artifacts:
>     * Collect artifacts: ERROR (in 0:00:08)
>   # import_templates: ERROR (in 0:00:09)
>   # Results located at
> /home/zram/master/default/nosetests-002_bootstrap.py.xml
> @ Run test: 002_bootstrap.py: ERROR (in 0:07:05)
> Error occured, aborting
>
>
> Now looking at the failure, but as is, I think it's worth committing.

That's probably related to the stale exported domain, if you use my patch, it
will be skipped

I actually think it's a v4 bug, looking at the logs now:
/testcase><testcase classname="002_bootstrap" name="import_templates" time="0.444"><error type="ovirtsdk.infrastructure.errors.RequestError" message="&#13;&#10;status: 500&#13;&#10;reason: Internal Server Error&#13;&#10;detail: &#10;&lt;html&gt;&lt;head&gt;&lt;title&gt;Error&lt;/title&gt;&lt;/head&gt;&lt;body&gt;Internal Server Error&lt;/body&gt;&lt;/html&gt;"><![CDATA[Traceback (most recent call last):
  File "/usr/lib64/python2.7/unittest/case.py", line 369, in run
    testMethod()
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/python2.7/site-packages/ovirtlago/testlib.py", line 119, in wrapped_test
    return test()
  File "/usr/lib/python2.7/site-packages/ovirtlago/testlib.py", line 51, in wrapper
    return func(get_test_prefix(), *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/ovirtlago/testlib.py", line 60, in wrapper
    return func(prefix.virt_env.engine_vm().get_api(), *args, **kwargs)
  File "/home/mini/ovirt-system-tests/basic_suite_master/test-scenarios/002_bootstrap.py", line 319, in import_templates
    name=CLUSTER_NAME,
  File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/brokers.py", line 26305, in register
    headers={"Correlation-Id":correlation_id}
  File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/proxy.py", line 115, in request
    persistent_auth=self.__persistent_auth
  File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/connectionspool.py", line 79, in do_request
    persistent_auth)
  File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/connectionspool.py", line 156, in __do_request
    raise errors.RequestError(response_code, response_reason, response_body)
RequestError: 
status: 500
reason: Internal Server Error
detail: 
<html><head><title>Error</title></head><body>Internal Server Error</body></html>


And server.log:

2016-03-14 11:28:51,798 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /ovirt-engine/api/v3/storagedomains/96ea77ef-5355-4cb0-bb64-e903c789341c/templates/1669165b-e9b3-4c65-
b435-8b9966000a23/register: java.lang.RuntimeException: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Can't find V3 input adapter of class "org.ovirt.engine.api.v3.adapters.V3ActionInAda
pter" for object of class "org.ovirt.engine.api.v3.types.V3Action"

The last is probably a yet-to-be-implemented backwards compatibility layer?

Comment 2 Mike McCune 2016-03-28 22:32:18 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 3 Eyal Edri 2016-04-03 08:29:38 UTC
Is this fixed? I see the patch is merged.