diff options
author | 2016-10-24 09:48:17 +0800 | |
---|---|---|
committer | 2016-10-24 09:48:17 +0800 | |
commit | 8c845695a6807a7455597a825ef66dc51228f938 (patch) | |
tree | 0e13c27e21ef16f4a801f60c3819c771ba24699b /catalog-core/catalog-mgr/src/test | |
parent | 8ca6e4a8fe05d99849af139705adf413ff77f565 (diff) |
Fix the bug TOSCA-135
Change-Id: Ie5d0038da8dee0c00dd37e6f18921af505a9f213
Issue-id: TOSCA-135
Signed-off-by: nancylizi <li.zi30@zte.com.cn>
Diffstat (limited to 'catalog-core/catalog-mgr/src/test')
-rw-r--r-- | catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/PackageWrapperTest.java | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/PackageWrapperTest.java b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/PackageWrapperTest.java index 93c7dc44..d672db1c 100644 --- a/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/PackageWrapperTest.java +++ b/catalog-core/catalog-mgr/src/test/java/org/openo/commontosca/catalog/wrapper/PackageWrapperTest.java @@ -98,10 +98,22 @@ public class PackageWrapperTest { manager.deletePackage(packageOid); } } - - PackageData packageData = new PackageData(); - packageData = getPackageData(); - manager.addPackage(packageData); + ArrayList<PackageData> packageList2 = manager.queryPackage(null, null, null, null, null); + if (packageList2 != null && packageList2.size() > 0) { + for (int j = 0; j < packageList2.size(); j++) { + if (packageList2.get(j).getCsarId().equals("123456")) { + manager.updatePackage(getPackageData(), "123456"); + } else { + PackageData packageData = new PackageData(); + packageData = getPackageData(); + manager.addPackage(packageData); + } + } + } else { + PackageData packageData = new PackageData(); + packageData = getPackageData(); + manager.addPackage(packageData); + } } // @Ignore |