[Kimchi-devel] [PATCH 0/5] Bug fixes and network tests

Aline Manera alinefm at linux.vnet.ibm.com
Tue Jan 6 16:41:16 UTC 2015


On 06/01/2015 13:40, Aline Manera wrote:
>
> On 06/01/2015 10:03, Daniel Henrique Barboza wrote:
>> Running the ./run-tests.sh script with these patches in my machine 
>> (Lenovo T410 with Fedora 20) gives the following error:
>>
>>
>> ======================================================================
>> FAIL: test_network_lifecycle (test_network.NetworkTests)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File "test_network.py", line 148, in test_network_lifecycle
>>     _do_test(net)
>>   File "test_network.py", line 101, in _do_test
>>     self.assertEquals(201, resp.status)
>> AssertionError: 201 != 400
>>
>> ----------------------------------------------------------------------
>>
>>
>> I made sure to run make clean // autogen.sh --system // make after 
>> applying the patches. Removing the patches fixes this behavior.
>>
>> Hope it helps!
>>
>
> Thanks for checking it, Daniel!
>
> I verified the test case and it is failing because I assumed in the 
> test case any interface would be good to create a bridged network 
> which is not always true.
>
> So I will remove the below code and send the V2
>
> +        # Verify the current system has at least one interface to 
> create a
> +        # bridged network
> +        interfaces = json.loads(self.request('/interfaces').read())
> +        if len(interfaces) > 0:
> +            iface = interfaces[0]['name']
> +            networks.append({'name': u'bridge-network', 'connection': 
> 'bridge',
> +                             'interface': iface})
> +            networks.append({'name': u'vlan-network', 'connection': 
> 'bridge',
> +                             'interface': iface, 'vlan_id': 999})
>
>

I will change MockModel to allow creating a bridged network without 
verifying the interface and make the above test case use MockModel.

>> Daniel
>>
>>
>> On 12/29/2014 12:53 PM, Aline Manera wrote:
>>> Aline Manera (5):
>>>    Add message to KCHNET0010E code
>>>    Bug fix: Allow deleting VLAN tagging bridged network
>>>    Network API: Update docs/API.md
>>>    Move rollback_wrapper function to a common place
>>>    Reorganize the network tests
>>>
>>>   docs/API.md                  |  11 ++--
>>>   src/kimchi/i18n.py           |   1 +
>>>   src/kimchi/model/networks.py |   6 +-
>>>   tests/test_model.py          |  86 ++-----------------------
>>>   tests/test_network.py        | 147 
>>> +++++++++++++++++++++++++++++++++++++++++++
>>>   tests/test_rest.py           |  64 -------------------
>>>   tests/utils.py               |  15 ++++-
>>>   7 files changed, 175 insertions(+), 155 deletions(-)
>>>   create mode 100644 tests/test_network.py
>>>
>>
>> _______________________________________________
>> Kimchi-devel mailing list
>> Kimchi-devel at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>>
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>




More information about the Kimchi-devel mailing list