You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/01/30 15:40:25 UTC

[04/30] ambari git commit: Revert "AMBARI-19741. Ambari Server Unit Test failure on branch-2.5/trunk for testUpdateConfigForceSecurityEnabled (echekanskiy via dlysnichenko)"

Revert "AMBARI-19741. Ambari Server Unit Test failure on branch-2.5/trunk for testUpdateConfigForceSecurityEnabled (echekanskiy via dlysnichenko)"

This reverts commit cc30798a6f1428fbe2a2dd6c64cac2c128cf9a23.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/65eb8867
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/65eb8867
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/65eb8867

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 65eb886720c2ccff344fe99928fabc23bcc48738
Parents: 23522a2
Author: Robert Levas <rl...@hortonworks.com>
Authored: Fri Jan 27 15:09:57 2017 -0500
Committer: Robert Levas <rl...@hortonworks.com>
Committed: Fri Jan 27 15:09:57 2017 -0500

----------------------------------------------------------------------
 .../UpdateKerberosConfigsServerActionTest.java        | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/65eb8867/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
index c8ebb63..e756491 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
@@ -22,7 +22,7 @@ import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
 
 import java.io.File;
 import java.util.Collection;
@@ -43,6 +43,7 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
+
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -164,15 +165,8 @@ public class UpdateKerberosConfigsServerActionTest extends EasyMockSupport{
     action.setExecutionCommand(executionCommand);
     action.execute(null);
 
-    assertTrue(configTypes.getValues().contains("cluster-env"));
-    boolean containsSecurityEnabled = false;
-    for(Map<String, String> properties: configUpdates.getValues()) {
-      if(properties.containsKey("security_enabled")) {
-        containsSecurityEnabled = true;
-        break;
-      }
-    }
-    assertTrue(containsSecurityEnabled);
+    assertEquals(configTypes.getValue(), "cluster-env");
+    assertEquals(configUpdates.getValue().get("security_enabled"), "false");
     verifyAll();
   }