aboutsummaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main
diff options
context:
space:
mode:
authorJoss Armstrong <joss.armstrong@ericsson.com>2019-02-12 11:04:19 +0000
committerTakamune Cho <takamune.cho@att.com>2019-02-12 15:55:53 +0000
commitd2f77574cd61f5ceb2a03bfa2ae1c6d4e5913098 (patch)
treec1f836bda26ca44dd3addbffac8075f7c9644f6c /appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main
parentcc8ae79f1986f67b113aef27878d7f958d9e2d49 (diff)
Test coverage in ServiceCatalogV3
Increased coverage from 44% to 94% Issue-ID: APPC-1418 Change-Id: I0e534a5bc20caaae25b28902caa58f0c5d950c31 Signed-off-by: Joss Armstrong <joss.armstrong@ericsson.com>
Diffstat (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main')
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV3.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV3.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV3.java
index df307bcf8..970182245 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV3.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV3.java
@@ -7,6 +7,8 @@
* Copyright (C) 2017 Amdocs
* =============================================================================
* Modifications Copyright © 2018 IBM.
+ * ================================================================================
+ * Modifications Copyright (C) 2019 Ericsson
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -136,7 +138,7 @@ public class ServiceCatalogV3 extends ServiceCatalog {
logger.error("An error occurred when initializing ServiceCatalogV3", e);
return;
}
- Keystone keystone = new Keystone(identityURL, connector);
+ Keystone keystone = getKeystone(identityURL, connector);
String proxyHost = properties.getProperty(ContextFactory.PROPERTY_PROXY_HOST);
String proxyPort = properties.getProperty(ContextFactory.PROPERTY_PROXY_PORT);
@@ -401,7 +403,7 @@ public class ServiceCatalogV3 extends ServiceCatalog {
}
return now.getTime();
}
-
+
public Project getProject() {
Lock readLock = rwLock.readLock();
readLock.lock();
@@ -411,4 +413,8 @@ public class ServiceCatalogV3 extends ServiceCatalog {
readLock.unlock();
}
}
+
+ protected Keystone getKeystone(String identityURL, OpenStackClientConnector connector) {
+ return new Keystone(identityURL, connector);
+ }
} \ No newline at end of file