karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1546107 - in /karaf/trunk/itests/src/test/java/org/apache/karaf/itests: FeatureTest.java JMXSecurityTest.java
Date Wed, 27 Nov 2013 16:54:51 GMT
Author: davidb
Date: Wed Nov 27 16:54:50 2013
New Revision: 1546107

URL: http://svn.apache.org/r1546107
Log:
Fixes to itests so that they run with the new command ACLs

Modified:
    karaf/trunk/itests/src/test/java/org/apache/karaf/itests/FeatureTest.java
    karaf/trunk/itests/src/test/java/org/apache/karaf/itests/JMXSecurityTest.java

Modified: karaf/trunk/itests/src/test/java/org/apache/karaf/itests/FeatureTest.java
URL: http://svn.apache.org/viewvc/karaf/trunk/itests/src/test/java/org/apache/karaf/itests/FeatureTest.java?rev=1546107&r1=1546106&r2=1546107&view=diff
==============================================================================
--- karaf/trunk/itests/src/test/java/org/apache/karaf/itests/FeatureTest.java (original)
+++ karaf/trunk/itests/src/test/java/org/apache/karaf/itests/FeatureTest.java Wed Nov 27 16:54:50
2013
@@ -21,6 +21,7 @@ import javax.management.ObjectName;
 import javax.management.openmbean.TabularData;
 import javax.management.remote.JMXConnector;
 
+import org.apache.karaf.jaas.boot.principal.RolePrincipal;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.junit.PaxExam;
@@ -62,13 +63,13 @@ public class FeatureTest extends KarafTe
 
     @Test
     public void installUninstallCommand() throws Exception {
-        String featureInstallOutput = executeCommand("feature:install -v eventadmin");
+        String featureInstallOutput = executeCommand("feature:install -v eventadmin", new
RolePrincipal("admin"));
         System.out.println(featureInstallOutput);
         assertFalse(featureInstallOutput.isEmpty());
         String featureListOutput = executeCommand("feature:list -i | grep eventadmin");
         System.out.println(featureListOutput);
         assertFalse(featureListOutput.isEmpty());
-        System.out.println(executeCommand("feature:uninstall eventadmin"));
+        System.out.println(executeCommand("feature:uninstall eventadmin", new RolePrincipal("admin")));
         featureListOutput = executeCommand("feature:list -i | grep eventadmin");
         System.out.println(featureListOutput);
         assertTrue(featureListOutput.isEmpty());

Modified: karaf/trunk/itests/src/test/java/org/apache/karaf/itests/JMXSecurityTest.java
URL: http://svn.apache.org/viewvc/karaf/trunk/itests/src/test/java/org/apache/karaf/itests/JMXSecurityTest.java?rev=1546107&r1=1546106&r2=1546107&view=diff
==============================================================================
--- karaf/trunk/itests/src/test/java/org/apache/karaf/itests/JMXSecurityTest.java (original)
+++ karaf/trunk/itests/src/test/java/org/apache/karaf/itests/JMXSecurityTest.java Wed Nov
27 16:54:50 2013
@@ -48,6 +48,7 @@ import javax.management.openmbean.Tabula
 import javax.management.openmbean.TabularType;
 import javax.management.remote.JMXConnector;
 
+import org.apache.karaf.jaas.boot.principal.RolePrincipal;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Configuration;
@@ -92,7 +93,7 @@ public class JMXSecurityTest extends Kar
             ";jaas:role-add " + viewerUser + " viewer" +
             ";jaas:update" +
             ";jaas:realm-manage --realm karaf" +
-            ";jaas:user-list"));
+            ";jaas:user-list", new RolePrincipal("admin")));
 
         JMXConnector connector = getJMXConnector(viewerUser, viewerUser);
         MBeanServerConnection connection = connector.getMBeanServerConnection();
@@ -132,7 +133,7 @@ public class JMXSecurityTest extends Kar
             ";jaas:role-add " + viewerUser + " viewer" +
             ";jaas:update" +
             ";jaas:realm-manage --realm karaf" +
-            ";jaas:user-list"));
+            ";jaas:user-list", new RolePrincipal("admin")));
 
         JMXConnector connector = getJMXConnector(managerUser, managerUser);
         MBeanServerConnection connection = connector.getMBeanServerConnection();
@@ -206,7 +207,7 @@ public class JMXSecurityTest extends Kar
             ";jaas:role-add " + viewerUser + " viewer" +
             ";jaas:update" +
             ";jaas:realm-manage --realm karaf" +
-            ";jaas:user-list"));
+            ";jaas:user-list", new RolePrincipal("admin")));
 
         try {
             getJMXConnector("admingroup", "group");



Mime
View raw message