aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-core/catalog-mgr/src/test
diff options
context:
space:
mode:
authornancylizi <li.zi30@zte.com.cn>2016-09-26 17:31:54 +0800
committernancylizi <li.zi30@zte.com.cn>2016-09-26 17:31:54 +0800
commit46fb5720713fafcc47bb2d3db852728edff7a0ef (patch)
tree915539cfc5c5f185c436aac986262b8c221dbfc0 /catalog-core/catalog-mgr/src/test
parentf8a3c48b5ca94ffb04903b252c032073d17c83a9 (diff)
Change download uri of package, restore the bug in upload package.
Issue-id:TOSCA-81 Change-Id: I96964c84ac237f6e07ab4d63b409faec0de58c85 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.java13
-rw-r--r--catalog-core/catalog-mgr/src/test/resources/NanocellGW.csarbin978854 -> 80812 bytes
2 files changed, 8 insertions, 5 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 d6dc15b9..b4f838ec 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
@@ -192,10 +192,9 @@ public class PackageWrapperTest {
System.out.println("Test get csar file uri ");
CsarFileUriResponse expectResult = new CsarFileUriResponse();
String csarFileUri =
- MsbAddrConfig.getMsbAddress() + "/NSAR/ZTE/NanocellGW/v1.0/NanocellGW/images/segw.img";
- String localUri =
- HttpServerPathConfig.getHttpServerPath()
- + "NSAR/ZTE/NanocellGW/v1.0/NanocellGW/images/segw.img";
+ getDownloadUriHead() + "/NSAR/ZTE/NanocellGW/v1.0/NanocellGW/images/segw.img";
+ String localUri = HttpServerPathConfig.getHttpServerPath()
+ + "NSAR/ZTE/NanocellGW/v1.0/NanocellGW/images/segw.img";
File srcDir = new File(localUri);
String localPath = srcDir.getAbsolutePath().replace("\\", "/");
@@ -272,7 +271,7 @@ public class PackageWrapperTest {
meta.setCreateTime("2016-06-29 03:33:15");
meta.setCsarId("123456");
meta.setDeletionPending(false);
- meta.setDownloadUri(MsbAddrConfig.getMsbAddress()
+ meta.setDownloadUri(getDownloadUriHead()
+ "/NSAR/ZTE/NanocellGW/v1.0/NanocellGW.csar");
meta.setFormat("yml");
meta.setModifyTime("2016-06-29 03:33:15");
@@ -289,4 +288,8 @@ public class PackageWrapperTest {
metas.add(meta);
return metas;
}
+
+ private String getDownloadUriHead() {
+ return MsbAddrConfig.getMsbAddress() + "/files/catalog-http";
+ }
}
diff --git a/catalog-core/catalog-mgr/src/test/resources/NanocellGW.csar b/catalog-core/catalog-mgr/src/test/resources/NanocellGW.csar
index d9efb502..d41b6b99 100644
--- a/catalog-core/catalog-mgr/src/test/resources/NanocellGW.csar
+++ b/catalog-core/catalog-mgr/src/test/resources/NanocellGW.csar
Binary files differ