fixing jenkins tests
This commit is contained in:
parent
a378941458
commit
a196e74f61
1 changed files with 29 additions and 12 deletions
|
@ -251,11 +251,39 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
|
||||||
// Nothing
|
// Nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Order(0)
|
||||||
|
public void testUsecase00_cleanupAllExams() {
|
||||||
|
final RestServiceImpl restService = createRestServiceForUser(
|
||||||
|
"admin",
|
||||||
|
"admin",
|
||||||
|
new GetExamNames(),
|
||||||
|
new DeleteExam());
|
||||||
|
|
||||||
|
final Result<List<EntityName>> call = restService
|
||||||
|
.getBuilder(GetExamNames.class)
|
||||||
|
.call();
|
||||||
|
|
||||||
|
if (!call.hasError()) {
|
||||||
|
call.get().stream().forEach(key -> {
|
||||||
|
final Result<EntityProcessingReport> deleted = restService
|
||||||
|
.getBuilder(DeleteExam.class)
|
||||||
|
.withURIVariable(API.PARAM_MODEL_ID, key.modelId)
|
||||||
|
.call();
|
||||||
|
|
||||||
|
if (deleted.hasError()) {
|
||||||
|
System.out.println("%%%%%%%%%%%%%%%%%%%%%%%%%% deletion failed: " + key);
|
||||||
|
} else {
|
||||||
|
System.out.println("%%%%%%%%%%%%%%%%%%%%%%%%%% deleted: " + key);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Order(1)
|
@Order(1)
|
||||||
// *************************************
|
// *************************************
|
||||||
// Use Case 1: SEB Administrator creates a new institution and activate this new institution
|
// Use Case 1: SEB Administrator creates a new institution and activate this new institution
|
||||||
|
|
||||||
public void testUsecase01() {
|
public void testUsecase01() {
|
||||||
final RestServiceImpl restService = createRestServiceForUser(
|
final RestServiceImpl restService = createRestServiceForUser(
|
||||||
"admin",
|
"admin",
|
||||||
|
@ -830,17 +858,6 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
|
||||||
//assertEquals(Long.valueOf(1), quizData.lmsSetupId);
|
//assertEquals(Long.valueOf(1), quizData.lmsSetupId);
|
||||||
assertEquals(Long.valueOf(4), quizData.institutionId);
|
assertEquals(Long.valueOf(4), quizData.institutionId);
|
||||||
|
|
||||||
// check imported
|
|
||||||
final Result<Collection<EntityKey>> checkCall = restService.getBuilder(CheckExamImported.class)
|
|
||||||
.withURIVariable(API.PARAM_MODEL_ID, quizData.getModelId())
|
|
||||||
.call();
|
|
||||||
assertFalse(checkCall.hasError());
|
|
||||||
final Collection<EntityKey> importCheck = checkCall.getOrThrow();
|
|
||||||
//assertTrue(importCheck.isEmpty()); // not imported at all
|
|
||||||
if (!importCheck.isEmpty()) {
|
|
||||||
System.out.println("******************************* " + importCheck.iterator().next());
|
|
||||||
}
|
|
||||||
|
|
||||||
// import quiz as exam
|
// import quiz as exam
|
||||||
final Result<Exam> newExamResult = restService
|
final Result<Exam> newExamResult = restService
|
||||||
.getBuilder(ImportAsExam.class)
|
.getBuilder(ImportAsExam.class)
|
||||||
|
|
Loading…
Reference in a new issue