[
https://issues.apache.org/jira/browse/CLOUDSTACK-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kelven Yang resolved CLOUDSTACK-1884.
-------------------------------------
Resolution: Fixed
The issue is caused by that some of the DAOs are not mocked, I've fixed as
per-case basis and we need some documentation on how to write unit test
correctly to avoid problems like this.
> CreateNetworkOffering tests broken due to database reference
> ------------------------------------------------------------
>
> Key: CLOUDSTACK-1884
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1884
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Test
> Affects Versions: 4.2.0
> Reporter: Hugo Trippaers
> Assignee: Kelven Yang
> Priority: Blocker
>
> how to replay:
> git checkout 5782abf8f80fce929e3d6e20068bc165f2360426
> mvn clean test -pl :cloud-server -am
> commit:
> commit 5782abf8f80fce929e3d6e20068bc165f2360426
> Author: Kelven Yang <[email protected]>
> Date: Fri Mar 29 11:01:40 2013 -0700
> Update unit test configuraitons to new custom Spring AOP
> Results :
> Tests in error:
>
> createSharedNtwkOffWithVlan(org.apache.cloudstack.networkoffering.CreateNetworkOfferingTest):
> DB Exception on: null
>
> createSharedNtwkOffWithNoVlan(org.apache.cloudstack.networkoffering.CreateNetworkOfferingTest):
> DB Exception on: null
>
> createSharedNtwkOffWithSpecifyIpRanges(org.apache.cloudstack.networkoffering.CreateNetworkOfferingTest):
> DB Exception on: null
>
> createSharedNtwkOffWithoutSpecifyIpRanges(org.apache.cloudstack.networkoffering.CreateNetworkOfferingTest):
> DB Exception on: null
>
> createIsolatedNtwkOffWithNoVlan(org.apache.cloudstack.networkoffering.CreateNetworkOfferingTest):
> DB Exception on: null
>
> createIsolatedNtwkOffWithVlan(org.apache.cloudstack.networkoffering.CreateNetworkOfferingTest):
> DB Exception on: null
>
> createIsolatedNtwkOffWithSpecifyIpRangesAndSourceNat(org.apache.cloudstack.networkoffering.CreateNetworkOfferingTest):
> DB Exception on: null
>
> createIsolatedNtwkOffWithSpecifyIpRangesAndNoSourceNat(org.apache.cloudstack.networkoffering.CreateNetworkOfferingTest):
> DB Exception on: null
> Tests run: 43, Failures: 0, Errors: 8, Skipped: 2
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira