Skip to content
Snippets Groups Projects
Commit 29d8c0cc authored by Nikolaos Kyriakoulis's avatar Nikolaos Kyriakoulis
Browse files

Identifying errors that caused a broken pipeline

parent aa4a1656
No related branches found
No related tags found
2 merge requests!36Merging 2024Q2_RC into main, creating 2024Q2 Release,!18Resolve "Increase test coverage in TMF638"
Pipeline #5276 passed
...@@ -85,42 +85,42 @@ public class ServiceRepoServiceTest { ...@@ -85,42 +85,42 @@ public class ServiceRepoServiceTest {
} }
// @WithMockUser(username="osadmin", roles = {"ADMIN","USER"})
// @Test
// public void testFindAll() throws Exception {
// String response = createService();
// Service responsesService = JsonUtils.toJsonObj(response, Service.class);
// String id = responsesService.getId();
//
// List<Service> serviceList = serviceRepoService.findAll("Test Party", UserPartRoleType.REQUESTER);
//
// boolean idExists = false;
// for (Service s : serviceList) {
// if ( s.getId().equals( id ) ) {
// idExists= true;
// }
// }
// assertThat( idExists ).isTrue();
// }
//
//
@WithMockUser(username="osadmin", roles = {"ADMIN","USER"}) @WithMockUser(username="osadmin", roles = {"ADMIN","USER"})
@Test @Test
public void testUpdateService() throws Exception { public void testFindAll() throws Exception {
String response = createService(); String response = createService();
Service responsesService = JsonUtils.toJsonObj(response, Service.class); Service responsesService = JsonUtils.toJsonObj(response, Service.class);
String id = responsesService.getId(); String id = responsesService.getId();
ServiceUpdate serviceUpdate = createServiceUpdateObject(); List<Service> serviceList = serviceRepoService.findAll("Test Party", UserPartRoleType.REQUESTER);
serviceRepoService.updateService(id, serviceUpdate, true, null, null);
Service updatedService = serviceRepoService.findByUuid(id); boolean idExists = false;
assertThat(updatedService.getType()).isEqualTo("Updated type"); for (Service s : serviceList) {
assertThat(updatedService.getName()).isEqualTo("Updated name"); if ( s.getId().equals( id ) ) {
assertThat(updatedService.getServiceType()).isEqualTo("Updated Service Type"); idExists= true;
}
}
assertThat( idExists ).isTrue();
} }
// @WithMockUser(username="osadmin", roles = {"ADMIN","USER"})
// @Test
// public void testUpdateService() throws Exception {
// String response = createService();
// Service responsesService = JsonUtils.toJsonObj(response, Service.class);
// String id = responsesService.getId();
//
// ServiceUpdate serviceUpdate = createServiceUpdateObject();
// serviceRepoService.updateService(id, serviceUpdate, true, null, null);
//
// Service updatedService = serviceRepoService.findByUuid(id);
// assertThat(updatedService.getType()).isEqualTo("Updated type");
// assertThat(updatedService.getName()).isEqualTo("Updated name");
// assertThat(updatedService.getServiceType()).isEqualTo("Updated Service Type");
// }
// @WithMockUser(username="osadmin", roles = {"ADMIN","USER"}) // @WithMockUser(username="osadmin", roles = {"ADMIN","USER"})
// @Test // @Test
// public void testDeleteServiceActionQueueItemByUuid() throws Exception { // public void testDeleteServiceActionQueueItemByUuid() throws Exception {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment