Search in sources :

Example 1 with InputsOutputs

use of com.epam.pipeline.entity.configuration.InputsOutputs in project cloud-pipeline by epam.

the class RunConfigurationDaoTest method testFirecloudConfigCreation.

@Test
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void testFirecloudConfigCreation() {
    List<InputsOutputs> inputs = Stream.of(InputsOutputs.builder().name(TEST_INPUT_NAME).type(TEST_INPUT_TYPE).value(TEST_INPUT_VALUE).build()).collect(Collectors.toList());
    List<InputsOutputs> outputs = Stream.of(InputsOutputs.builder().name(TEST_OUTPUT_NAME).value(TEST_OUTPUT_VALUE).build()).collect(Collectors.toList());
    // create
    FirecloudRunConfigurationEntry entry = ObjectCreatorUtils.createFirecloudConfigEntry(TEST_CONFIG_NAME, inputs, outputs, TEST_FIRECLOUD_METHOD, TEST_FIRECLOUD_METHOD_SNAPSHOT, TEST_FIRECLOUD_CONFIGURATION);
    RunConfiguration configuration = ObjectCreatorUtils.createConfiguration(TEST_NAME, TEST_DESCRIPTION, null, TEST_OWNER, Collections.singletonList(entry));
    RunConfiguration created = runConfigurationDao.create(configuration);
    verifyFirecloudConfiguration(configuration, created);
    // load
    RunConfiguration loaded = runConfigurationDao.load(created.getId());
    verifyFirecloudConfiguration(configuration, loaded);
}
Also used : FirecloudRunConfigurationEntry(com.epam.pipeline.entity.configuration.FirecloudRunConfigurationEntry) RunConfiguration(com.epam.pipeline.entity.configuration.RunConfiguration) InputsOutputs(com.epam.pipeline.entity.configuration.InputsOutputs) Test(org.junit.Test) AbstractSpringTest(com.epam.pipeline.AbstractSpringTest) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

AbstractSpringTest (com.epam.pipeline.AbstractSpringTest)1 FirecloudRunConfigurationEntry (com.epam.pipeline.entity.configuration.FirecloudRunConfigurationEntry)1 InputsOutputs (com.epam.pipeline.entity.configuration.InputsOutputs)1 RunConfiguration (com.epam.pipeline.entity.configuration.RunConfiguration)1 Test (org.junit.Test)1 Transactional (org.springframework.transaction.annotation.Transactional)1