From cc8ae79f1986f67b113aef27878d7f958d9e2d49 Mon Sep 17 00:00:00 2001 From: Joss Armstrong Date: Tue, 12 Feb 2019 10:36:25 +0000 Subject: Test coverage in ServiceCatalogv2 Increased coverage from 57% to 91% Issue-ID: APPC-1418 Change-Id: I0f2b77bdb451d973d631f4c785b65de3bb84f02f Signed-off-by: Joss Armstrong --- .../java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV2.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (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/ServiceCatalogV2.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV2.java index 4fe0c2e33..382de36ef 100644 --- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV2.java +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV2.java @@ -5,6 +5,8 @@ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Copyright (C) 2017 Amdocs + * ================================================================================ + * 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. @@ -128,7 +130,7 @@ public class ServiceCatalogV2 extends ServiceCatalog { loggerV2.error(e.getMessage()); 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); @@ -384,4 +386,8 @@ public class ServiceCatalogV2 extends ServiceCatalog { } return now.getTime(); } + + protected Keystone getKeystone(String identityUrl, OpenStackClientConnector connector) { + return new Keystone(identityURL, connector); + } } -- cgit 1.2.3-korg