TW-57802 Fix tests
authorMikhail Khorkov <mikhail.khorkov@jetbrains.com>
Wed, 14 Nov 2018 08:34:36 +0000 (15:34 +0700)
committerMikhail Khorkov <mikhail.khorkov@jetbrains.com>
Wed, 14 Nov 2018 08:34:36 +0000 (15:34 +0700)
git-tests/src/jetbrains/buildServer/buildTriggers/vcs/git/tests/LoggingGitMetaFactory.java
git-tests/src/jetbrains/buildServer/buildTriggers/vcs/git/tests/SSLInvestigatorTest.java

index b665016372246d871540c19e1028caae1a46d873..c94cf2705fdad44217d85818d94d1a53f3f275e0 100644 (file)
@@ -58,8 +58,9 @@ public class LoggingGitMetaFactory implements GitMetaFactory {
       return 0;
     int result = 0;
     for (String method : methods) {
-      if ("call".equals(method))
+      if ("call".equals(method) || "callWithIgnoreExitCode".equals(method)) {
         result++;
+      }
     }
     return result;
   }
index 87e3ce81437089798236218904a4a87090d8e5b9..6550cbd20c7f610b79d67f4e5f3890ba4b221381 100644 (file)
@@ -136,10 +136,10 @@ public class SSLInvestigatorTest {
     }
 
     final String alreadyInProperties = alreadySet ? "something" : "";
-    myLoggingFactory.addCallback(GetConfigCommand.class.getName() + ".call",
-                                 (method, args) -> Optional.of(alreadyInProperties));
-    myLoggingFactory.addCallback(SetConfigCommand.class.getName() + ".call",
-                                 (method, args) -> Optional.empty());
+    final GitCommandProxyCallback gitCommandProxyCallback = (method, args) -> Optional.of(alreadyInProperties);
+    myLoggingFactory.addCallback(GetConfigCommand.class.getName() + ".call", gitCommandProxyCallback);
+    myLoggingFactory.addCallback(GetConfigCommand.class.getName() + ".callWithIgnoreExitCode", gitCommandProxyCallback);
+    myLoggingFactory.addCallback(SetConfigCommand.class.getName() + ".call", (method, args) -> Optional.empty());
 
     final SSLInvestigator instance = createInstance();