From d2f77574cd61f5ceb2a03bfa2ae1c6d4e5913098 Mon Sep 17 00:00:00 2001 From: Joss Armstrong Date: Tue, 12 Feb 2019 11:04:19 +0000 Subject: Test coverage in ServiceCatalogV3 Increased coverage from 44% to 94% Issue-ID: APPC-1418 Change-Id: I0e534a5bc20caaae25b28902caa58f0c5d950c31 Signed-off-by: Joss Armstrong --- .../java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV3.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main') 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 -- cgit 1.2.3-korg