use of com.epam.pipeline.entity.pipeline.ToolGroup in project cloud-pipeline by epam.
the class ToolGroupDaoTest method deleteToolGroup.
@Test
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void deleteToolGroup() {
ToolGroup group = saveToolGroup(TEST_GROUP_NAME, registry);
toolGroupDao.deleteToolGroup(group.getId());
Assert.assertTrue(toolGroupDao.loadToolGroups().stream().noneMatch(g -> g.getId().equals(group.getId())));
}
use of com.epam.pipeline.entity.pipeline.ToolGroup in project cloud-pipeline by epam.
the class ToolGroupDaoTest method saveToolGroup.
private ToolGroup saveToolGroup(String name, DockerRegistry dockerRegistry) {
ToolGroup group = getToolGroup(name, dockerRegistry);
toolGroupDao.createToolGroup(group);
return group;
}
use of com.epam.pipeline.entity.pipeline.ToolGroup in project cloud-pipeline by epam.
the class ToolGroupDaoTest method checkFields.
private void checkFields(ToolGroup group, Optional<ToolGroup> loaded) {
Assert.assertTrue(loaded.isPresent());
ToolGroup loadedGroup = loaded.get();
Assert.assertEquals(group.getId(), loadedGroup.getId());
Assert.assertEquals(group.getName(), loadedGroup.getName());
Assert.assertEquals(group.getRegistryId(), loadedGroup.getRegistryId());
Assert.assertEquals(group.getOwner(), loadedGroup.getOwner());
Assert.assertEquals(group.getDescription(), loadedGroup.getDescription());
}
use of com.epam.pipeline.entity.pipeline.ToolGroup in project cloud-pipeline by epam.
the class ToolGroupDaoTest method createToolGroup.
@Test
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void createToolGroup() {
ToolGroup group = saveToolGroup(TEST_GROUP_NAME, registry);
Assert.assertNotNull(group.getId());
}
use of com.epam.pipeline.entity.pipeline.ToolGroup in project cloud-pipeline by epam.
the class ToolVulnerabilityDaoTest method setUp.
@Before
public void setUp() throws Exception {
DockerRegistry registry = DockerRegistryDaoTest.getDockerRegistry();
dockerRegistryDao.createDockerRegistry(registry);
ToolGroup group = ToolGroupDaoTest.getToolGroup("test", registry);
toolGroupDao.createToolGroup(group);
tool = generateTool();
tool.setToolGroupId(group.getId());
tool.setRegistryId(registry.getId());
toolDao.createTool(tool);
}
Aggregations