Package com.sonyericsson.hudson.plugins.gerrit.gerritevents.ssh

Examples of com.sonyericsson.hudson.plugins.gerrit.gerritevents.ssh.SshConnection.executeCommand()


      logger.info(String.format("Sending results to gerrit for %s: %s", commit, result));

      SshConnection ssh = SshConnectionFactory.getConnection(connection);
      String command = GerritCommand.createCodeReview(commit, result);
      ssh.executeCommand(command);

      logger.info("Results sent successfully");
    }
  }
View Full Code Here


    //when
    //the analysis is run, the local sonar instance must be up
    final SonarAnalysisResult result = new SonarAnalysisResult("test", SonarAnalysisStatus.ERRORS);
    String codeReview = GerritCommand.createCodeReview(commit, result);
    ssh.executeCommand(codeReview);

    //then

  }
View Full Code Here

    // when
    when(sshConnection.isConnected()).thenReturn(true);
    when(sshConnection.isAuthenticated()).thenReturn(true);
    when(sshConnection.isSessionOpen()).thenReturn(true);
    when(SshConnectionFactory.getConnection((GerritConnection) any())).thenReturn(sshConnection);
    when(sshConnection.executeCommand(anyString())).thenReturn("OK");

    when(sonarResultEvaluator.getResult(context, URL)).thenReturn(
        new SonarAnalysisResult("message", SonarAnalysisStatus.NO_PROBLEMS));

    gerritNotifier.executeOn(project, context);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.