diff options
author | 2016-09-26 10:51:22 +0800 | |
---|---|---|
committer | 2016-09-26 10:51:22 +0800 | |
commit | f8a3c48b5ca94ffb04903b252c032073d17c83a9 (patch) | |
tree | 1b5168a18a41ecc7fed66f9bc878931b1cecbf36 /catalog-core/catalog-mgr/src/test | |
parent | c83d69be71573ba32ac395934fff150c7bda6108 (diff) |
Modify the bug about uploadPackage and queryPackageById
Issue-id:TOSCA-77
Change-Id: I2697f150bca4404bd2c806c9669961c2ddba6de2
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 | 19 |
1 files changed, 11 insertions, 8 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 4622542b..d6dc15b9 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 @@ -43,6 +43,9 @@ import org.openo.commontosca.catalog.entity.EnumProcessState; import org.openo.commontosca.catalog.entity.EnumUsageState; import org.openo.commontosca.catalog.entity.response.CsarFileUriResponse; import org.openo.commontosca.catalog.entity.response.PackageMeta; +import org.openo.commontosca.catalog.model.parser.EnumPackageFormat; +import org.openo.commontosca.catalog.model.parser.ModelParserFactory; +import org.openo.commontosca.catalog.model.parser.yaml.zte.ToscaYamlModelParser; import java.io.File; import java.io.FileInputStream; @@ -55,19 +58,18 @@ import javax.ws.rs.core.Response; public class PackageWrapperTest { private static String resourcePath; - - static { - MsbAddrConfig.setMsbAddress("http://127.0.0.1:80"); - } static { + MsbAddrConfig.setMsbAddress("http://10.74.44.28:80"); HttpServerAddrConfig.setHttpServerAddress("http://127.0.0.1:8080"); - } - - static { HttpServerPathConfig.setHttpServerPath("../tomcat/webapps/ROOT/"); + + CatalogAppConfiguration configuration = new CatalogAppConfiguration(); + Config.setConfigration(configuration); + Config.getConfigration().setParserType("zte"); + ModelParserFactory.getInstance().put(EnumPackageFormat.TOSCA_YAML, new TestYamlModelParser()); } - + private static PackageManager manager; @@ -135,6 +137,7 @@ public class PackageWrapperTest { e3.printStackTrace(); } } + assertNotNull(result); assertEquals(200, result.getStatus()); assertNotNull(result.getEntity()); |