From 8c9631e438b9491424df0f43d43445f098436834 Mon Sep 17 00:00:00 2001 From: Skip Wonnell Date: Tue, 29 Aug 2017 14:16:20 -0500 Subject: ChefAdapter code clean-up Issue-ID: APPC-90 Change-Id: I582d6b0c81d5a89938fff6038dfcc221ccaf19c1 Signed-off-by: Skip Wonnell --- .../appc/adapter/chef/impl/TestChefAdapterImpl.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/test/java') diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/test/java/org/openecomp/appc/adapter/chef/impl/TestChefAdapterImpl.java b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/test/java/org/openecomp/appc/adapter/chef/impl/TestChefAdapterImpl.java index d9b172aba..744f84722 100644 --- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/test/java/org/openecomp/appc/adapter/chef/impl/TestChefAdapterImpl.java +++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/test/java/org/openecomp/appc/adapter/chef/impl/TestChefAdapterImpl.java @@ -72,18 +72,17 @@ public class TestChefAdapterImpl { @Before public void setup() throws IllegalArgumentException, IllegalAccessException { - adapter = new ChefAdapterImpl(); + adapter = new ChefAdapterImpl(System.getProperty("user.dir")+"/src/main/resources/client.pem"); } - + @Test public void testChefGet() throws IOException, IllegalStateException, IllegalArgumentException, ZoneException, APPCException { Map params = new HashMap<>(); params.put("org.openecomp.appc.instance.chefAction", "/nodes"); - - - SvcLogicContext svcContext = new SvcLogicContext(); + + SvcLogicContext svcContext = new SvcLogicContext(); adapter.chefGet(params, svcContext); String status=svcContext.getAttribute("org.openecomp.appc.chefServerResult.code"); assertEquals("200",status); @@ -98,7 +97,7 @@ public class TestChefAdapterImpl { params.put("org.openecomp.appc.instance.chefAction", "/nodes/testnode"); params.put("org.openecomp.appc.instance.runList", "recipe[commandtest]"); params.put("org.openecomp.appc.instance.attributes", ""); - SvcLogicContext svcContext = new SvcLogicContext(); + SvcLogicContext svcContext = new SvcLogicContext(); adapter.chefPut(params, svcContext); String status=svcContext.getAttribute("org.openecomp.appc.chefServerResult.code"); assertEquals("200",status); @@ -111,7 +110,7 @@ public class TestChefAdapterImpl { Map params = new HashMap<>(); params.put("org.openecomp.appc.instance.ip", "http://example.com/test"); - SvcLogicContext svcContext = new SvcLogicContext(); + SvcLogicContext svcContext = new SvcLogicContext(); adapter.trigger(params, svcContext); String status=svcContext.getAttribute("org.openecomp.appc.chefAgent.code"); assertEquals("200",status); -- cgit 1.2.3-korg