use of pipelite.stage.executor.StageExecutorRequest in project pipelite by enasequence.
the class LsfLogFilePathResolverTest method testWithDirWithUser.
@Test
public void testWithDirWithUser() {
StageExecutorRequest request = request();
AbstractLsfExecutorParameters params = AbstractLsfExecutorParameters.builder().logDir("a/b").user("user").build();
LsfLogFilePathResolver resolver = new LsfLogFilePathResolver(request, params);
assertThat(resolver.getDir(LsfFilePathResolver.Format.WITHOUT_LSF_PATTERN)).isEqualTo("a/b/user/" + PIPELITE_NAME + "/" + PROCESS_ID);
assertThat(resolver.getFile(LsfFilePathResolver.Format.WITHOUT_LSF_PATTERN)).isEqualTo("a/b/user/" + PIPELITE_NAME + "/" + PROCESS_ID + "/" + STAGE_NAME + ".out");
assertThat(resolver.getDir(LsfFilePathResolver.Format.WITH_LSF_PATTERN)).isEqualTo("a/b/%U/" + PIPELITE_NAME + "/" + PROCESS_ID);
assertThat(resolver.getFile(LsfFilePathResolver.Format.WITH_LSF_PATTERN)).isEqualTo("a/b/%U/" + PIPELITE_NAME + "/" + PROCESS_ID + "/" + STAGE_NAME + ".out");
}
Aggregations