comparatorType); ComparatorBase comp = (ComparatorBase) comparatorClass.newInstance(); compareOutput = comp.compare(cmdResult.getCommandOutput(), compdata.getExpectedOutput()); } catch (Exception e) {
public Result executeCommand(final String cmd) throws Exception { int exitCode = 0; Exception lastException = null; ByteArrayOutputStream bao = new ByteArrayOutputStream(); PrintStream origOut = System.out; PrintStream origErr = System.err; System.setOut(new PrintStream(bao)); System.setErr(new PrintStream(bao)); try { execute(cmd); } catch (Exception e) { e.printStackTrace(); lastException = e; exitCode = -1; } finally { System.setOut(origOut); System.setErr(origErr); } return new Result(bao.toString(), exitCode, lastException, cmd); }
cd.setExitCode(cmdResult.getExitCode()); cd.setActualOutput(cmdResult.getCommandOutput()); cd.setTestResult(compareOutput);
cd.setExitCode(cmdResult.getExitCode()); cd.setActualOutput(cmdResult.getCommandOutput()); cd.setTestResult(compareOutput);
restore = fsi.getRestoreFailedStorage(); assertTrue("After check call restore is " + restore, restore); String commandOutput = cmdResult.getCommandOutput(); commandOutput.trim(); assertTrue(commandOutput.contains("restoreFailedStorage is set to true"));
cd.setExitCode(cmdResult.getExitCode()); cd.setActualOutput(cmdResult.getCommandOutput()); cd.setTestResult(compareOutput);
restore = fsi.getStorage().getRestoreFailedStorage(); assertTrue("After check call restore is " + restore, restore); String commandOutput = cmdResult.getCommandOutput(); commandOutput.trim(); assertTrue(commandOutput.contains("restoreFailedStorage is set to true"));
comparatorType); ComparatorBase comp = (ComparatorBase) comparatorClass.newInstance(); compareOutput = comp.compare(cmdResult.getCommandOutput(), expandCommand(compdata.getExpectedOutput())); } catch (Exception e) {
comparatorType); ComparatorBase comp = (ComparatorBase) comparatorClass.newInstance(); compareOutput = comp.compare(cmdResult.getCommandOutput(), expandCommand(compdata.getExpectedOutput())); } catch (Exception e) {
public Result executeCommand(final String cmd) throws Exception { int exitCode = 0; Exception lastException = null; ByteArrayOutputStream bao = new ByteArrayOutputStream(); PrintStream origOut = System.out; PrintStream origErr = System.err; System.setOut(new PrintStream(bao)); System.setErr(new PrintStream(bao)); try { execute(cmd); } catch (Exception e) { e.printStackTrace(); lastException = e; exitCode = -1; } finally { System.setOut(origOut); System.setErr(origErr); } return new Result(bao.toString(), exitCode, lastException, cmd); }
public Result executeCommand(final String cmd) throws Exception { int exitCode = 0; Exception lastException = null; ByteArrayOutputStream bao = new ByteArrayOutputStream(); PrintStream origOut = System.out; PrintStream origErr = System.err; System.setOut(new PrintStream(bao)); System.setErr(new PrintStream(bao)); try { execute(cmd); } catch (Exception e) { e.printStackTrace(); lastException = e; exitCode = -1; } finally { System.setOut(origOut); System.setErr(origErr); } return new Result(bao.toString(), exitCode, lastException, cmd); }