Пример #1
0
  /**
   * Test validates the happy path when an log viewer is configured with '${execid}' and '${jobid}
   * as the format in 'azkaban.properties'.
   */
  @Test
  public void testGetExternalLogViewerValidFormat() {
    azkProps.put(
        ServerProperties.AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC, EXTERNAL_LOGVIEWER_TOPIC);
    azkProps.put(
        ServerProperties.AZKABAN_SERVER_EXTERNAL_TOPIC_URL.replace(
            "${topic}", EXTERNAL_LOGVIEWER_TOPIC),
        EXTERNAL_LOGVIEWER_URL_VALID_FORMAT);

    String externalURL = ExternalLinkUtils.getExternalLogViewer(azkProps, jobId, jobProps);
    assertTrue(externalURL.equals(EXTERNAL_LOGVIEWER_EXPECTED_URL));
  }
Пример #2
0
 /**
  * Test validates the condition when an external log viewer is not configured in
  * 'azkaban.properties'.
  */
 @Test
 public void testGetLogViewerNotConfigured() {
   String executionExternalLinkURL =
       ExternalLinkUtils.getExternalLogViewer(azkProps, jobId, jobProps);
   assertTrue(executionExternalLinkURL.equals(""));
 }