Repository: stratos Updated Branches: refs/heads/stratos-4.1.x f977732b2 -> 44f527018
Revert "Adding the unit test to the aws lb extension" This reverts commit f977732b25b016a9af281d102b371c9ef3a22713. Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/8c0b402f Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/8c0b402f Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/8c0b402f Branch: refs/heads/stratos-4.1.x Commit: 8c0b402fb0f374a0cec8761bdc940923e3b87462 Parents: f977732 Author: gayangunarathne <[email protected]> Authored: Mon Nov 16 20:06:06 2015 +0530 Committer: gayangunarathne <[email protected]> Committed: Mon Nov 16 20:06:06 2015 +0530 ---------------------------------------------------------------------- .../stratos/aws/extension/AwsHelperTest.java | 82 -------------------- .../src/test/resources/log4j.properties | 28 ------- 2 files changed, 110 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/8c0b402f/extensions/load-balancer/modules/aws-extension/src/test/java/org/apache/stratos/aws/extension/AwsHelperTest.java ---------------------------------------------------------------------- diff --git a/extensions/load-balancer/modules/aws-extension/src/test/java/org/apache/stratos/aws/extension/AwsHelperTest.java b/extensions/load-balancer/modules/aws-extension/src/test/java/org/apache/stratos/aws/extension/AwsHelperTest.java deleted file mode 100644 index 840227d..0000000 --- a/extensions/load-balancer/modules/aws-extension/src/test/java/org/apache/stratos/aws/extension/AwsHelperTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.stratos.aws.extension; - -import com.amazonaws.services.ec2.model.Filter; -import org.apache.stratos.load.balancer.extension.api.exception.LoadBalancerExtensionException; - -import org.junit.*; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.Set; - - -/** - * AwsHelper util test. - */ -public class AwsHelperTest { - - @Test - public void testSecurityGroupFilters() - throws LoadBalancerExtensionException, NoSuchMethodException, InvocationTargetException, - IllegalAccessException { - Set<Filter> filters=(Set<Filter>)genericInvokMethod(new AWSHelper(null,null), "getFilters",2,"Test VPC ID","test"); - - Assert.assertNotNull(filters); - Assert.assertEquals(2,filters.size()); - - } - - /** - * Method to access the private methods - * @param obj - * @param methodName - * @param paramCount - * @param params - * @return - */ - public static Object genericInvokMethod(Object obj, String methodName, - int paramCount, Object... params) { - Method method; - Object requiredObj = null; - Object[] parameters = new Object[paramCount]; - Class<?>[] classArray = new Class<?>[paramCount]; - for (int i = 0; i < paramCount; i++) { - parameters[i] = params[i]; - classArray[i] = params[i].getClass(); - } - try { - method = obj.getClass().getDeclaredMethod(methodName, classArray); - method.setAccessible(true); - requiredObj = method.invoke(obj, params); - } catch (NoSuchMethodException e) { - e.printStackTrace(); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } catch (InvocationTargetException e) { - e.printStackTrace(); - } - - return requiredObj; - } - } http://git-wip-us.apache.org/repos/asf/stratos/blob/8c0b402f/extensions/load-balancer/modules/aws-extension/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/extensions/load-balancer/modules/aws-extension/src/test/resources/log4j.properties b/extensions/load-balancer/modules/aws-extension/src/test/resources/log4j.properties deleted file mode 100644 index 1da5b96..0000000 --- a/extensions/load-balancer/modules/aws-extension/src/test/resources/log4j.properties +++ /dev/null @@ -1,28 +0,0 @@ -# -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# - -log4j.appender.console=org.apache.log4j.ConsoleAppender -log4j.appender.console.Target=System.out -log4j.appender.console.layout=org.apache.log4j.PatternLayout -log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %c{1} [%t] %n%m%n - -#Loggers -log4j.rootLogger=info, console
