use of com.epam.pipeline.elasticsearchagent.model.ConfigurationEntryDoc in project cloud-pipeline by epam.
the class ConfigurationMapperTest method shouldMapFireCloudConfiguration.
@Test
void shouldMapFireCloudConfiguration() throws IOException {
ConfigurationEntryMapper mapper = new ConfigurationEntryMapper();
RunConfiguration runConfiguration = buildRunConfiguration();
FirecloudRunConfigurationEntry entry = new FirecloudRunConfigurationEntry();
entry.setName(TEST_NAME);
entry.setMethodName(TEST_NAME);
entry.setMethodSnapshot(TEST_SNAPSHOT);
entry.setMethodConfigurationName(TEST_NAME);
entry.setMethodConfigurationSnapshot(TEST_SNAPSHOT);
ConfigurationEntryDoc configuration = buildDoc(null, runConfiguration, entry);
XContentBuilder contentBuilder = mapper.map(buildContainer(configuration));
verifyFirecloudConfigurationEntry(entry, contentBuilder);
verifyRunConfiguration(runConfiguration, TEST_NAME + " ", contentBuilder);
verifyPipelineUser(USER, contentBuilder);
verifyPermissions(PERMISSIONS_CONTAINER, contentBuilder);
verifyMetadata(EXPECTED_METADATA, contentBuilder);
}
use of com.epam.pipeline.elasticsearchagent.model.ConfigurationEntryDoc in project cloud-pipeline by epam.
the class ConfigurationMapperTest method shouldMapRunConfiguration.
@Test
void shouldMapRunConfiguration() throws IOException {
ConfigurationEntryMapper mapper = new ConfigurationEntryMapper();
Pipeline pipeline = buildPipeline();
RunConfiguration runConfiguration = buildRunConfiguration();
PipelineConfiguration pipelineConfiguration = new PipelineConfiguration();
pipelineConfiguration.setDockerImage(TEST_PATH);
RunConfigurationEntry entry = new RunConfigurationEntry();
entry.setPipelineVersion(TEST_VERSION);
entry.setName(TEST_NAME);
entry.setConfiguration(pipelineConfiguration);
ConfigurationEntryDoc configuration = buildDoc(pipeline, runConfiguration, entry);
XContentBuilder contentBuilder = mapper.map(buildContainer(configuration));
verifyRunConfiguration(runConfiguration, TEST_NAME + " ", contentBuilder);
verifyRunConfigurationEntry(entry, pipeline, contentBuilder);
verifyPipelineUser(USER, contentBuilder);
verifyPermissions(PERMISSIONS_CONTAINER, contentBuilder);
verifyMetadata(EXPECTED_METADATA, contentBuilder);
}
Aggregations