use of com.epam.pipeline.entity.pipeline.ToolGroup in project cloud-pipeline by epam.
the class DockerRegistryDaoTest method deleteDockerRegistryAfterDeletingToolShouldNotThrowsException.
@Test
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void deleteDockerRegistryAfterDeletingToolShouldNotThrowsException() throws Exception {
DockerRegistry created = getDockerRegistry();
registryDao.createDockerRegistry(created);
ToolGroup library = createToolGroup(created);
toolGroupDao.createToolGroup(library);
Tool tool = createTool(TOOL_IMAGE, created.getId(), library);
toolDao.createTool(tool);
toolDao.deleteTool(tool.getId());
toolGroupDao.deleteToolGroup(library.getId());
registryDao.deleteDockerRegistry(created.getId());
}
use of com.epam.pipeline.entity.pipeline.ToolGroup in project cloud-pipeline by epam.
the class ToolGroupDaoTest method loadToolGroup1.
@Test
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void loadToolGroup1() {
ToolGroup group = saveToolGroup(TEST_GROUP_NAME, registry);
Optional<ToolGroup> loaded = toolGroupDao.loadToolGroup(group.getName(), group.getRegistryId());
checkFields(group, loaded);
}
use of com.epam.pipeline.entity.pipeline.ToolGroup in project cloud-pipeline by epam.
the class ToolGroupDaoTest method testUpdateToolGroup.
@Test
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void testUpdateToolGroup() {
ToolGroup group = saveToolGroup(TEST_GROUP_NAME, registry);
group.setDescription(TEST_OTHER_DESCRIPTION);
group.setOwner(TEST_USER2);
toolGroupDao.updateToolGroup(group);
ToolGroup loaded = toolGroupDao.loadToolGroup(group.getId()).get();
Assert.assertEquals(TEST_USER2, loaded.getOwner());
Assert.assertEquals(TEST_OTHER_DESCRIPTION, loaded.getDescription());
}
use of com.epam.pipeline.entity.pipeline.ToolGroup in project cloud-pipeline by epam.
the class ToolGroupDaoTest method getToolGroup.
static ToolGroup getToolGroup(String name, DockerRegistry dockerRegistry) {
ToolGroup group = new ToolGroup();
group.setName(name);
group.setRegistryId(dockerRegistry.getId());
group.setOwner(TEST_USER);
group.setDescription(TEST_DESCRIPTION);
return group;
}
use of com.epam.pipeline.entity.pipeline.ToolGroup in project cloud-pipeline by epam.
the class ToolGroupDaoTest method loadToolGroup.
@Test
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void loadToolGroup() {
ToolGroup group = saveToolGroup(TEST_GROUP_NAME, registry);
Optional<ToolGroup> loaded = toolGroupDao.loadToolGroup(group.getId());
checkFields(group, loaded);
}
Aggregations