public Void call() throws Exception {
String oozieUrl = getContextURL();
MockDagEngineService.reset();
String[] args = new String[]{"job", "-oozie", oozieUrl, "-info", MockDagEngineService.JOB_ID + "0" +
MockDagEngineService.JOB_ID_END};
assertEquals(0, new OozieCLI().run(args));
assertEquals(RestConstants.JOB_SHOW_INFO, MockDagEngineService.did);
args = new String[]{"job", "-localtime", "-oozie", oozieUrl, "-info", MockDagEngineService.JOB_ID +
"1" + MockDagEngineService.JOB_ID_END};
assertEquals(0, new OozieCLI().run(args));
assertEquals(RestConstants.JOB_SHOW_INFO, MockDagEngineService.did);
args = new String[]{"job", "-timezone", "PST", "-oozie", oozieUrl, "-info",
MockDagEngineService.JOB_ID + "1" + MockDagEngineService.JOB_ID_END};
assertEquals(0, new OozieCLI().run(args));
assertEquals(RestConstants.JOB_SHOW_INFO, MockDagEngineService.did);
args = new String[]{"job", "-oozie", oozieUrl, "-info", MockDagEngineService.JOB_ID + "2" +
MockDagEngineService.JOB_ID_END};
assertEquals(0, new OozieCLI().run(args));
assertEquals(RestConstants.JOB_SHOW_INFO, MockDagEngineService.did);
args = new String[]{"job", "-oozie", oozieUrl, "-info",
MockDagEngineService.JOB_ID + (MockDagEngineService.workflows.size() + 1)};
assertEquals(-1, new OozieCLI().run(args));
return null;
}
});
}