Search in sources :

Example 6 with LsfExecutorParameters

use of pipelite.stage.parameters.LsfExecutorParameters in project pipelite by enasequence.

the class LsfDefinitionFilePathResolverTest method testWithDirWithUser.

@Test
public void testWithDirWithUser() {
    StageExecutorRequest request = request();
    LsfExecutorParameters params = LsfExecutorParameters.builder().definitionDir("a/b").user("user").build();
    LsfDefinitionFilePathResolver resolver = new LsfDefinitionFilePathResolver(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 + ".job");
    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 + ".job");
}
Also used : StageExecutorRequest(pipelite.stage.executor.StageExecutorRequest) LsfExecutorParameters(pipelite.stage.parameters.LsfExecutorParameters) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)6 StageExecutorRequest (pipelite.stage.executor.StageExecutorRequest)6 LsfExecutorParameters (pipelite.stage.parameters.LsfExecutorParameters)6 Stage (pipelite.stage.Stage)2 LsfDefinitionFilePathResolver (pipelite.stage.path.LsfDefinitionFilePathResolver)1 LsfFilePathResolver (pipelite.stage.path.LsfFilePathResolver)1 LsfLogFilePathResolver (pipelite.stage.path.LsfLogFilePathResolver)1