diff --git a/src/main/java/app/coronawarn/quicktest/model/TestResult.java b/src/main/java/app/coronawarn/quicktest/model/TestResult.java index feb0e2fa..ba74b410 100644 --- a/src/main/java/app/coronawarn/quicktest/model/TestResult.java +++ b/src/main/java/app/coronawarn/quicktest/model/TestResult.java @@ -29,7 +29,8 @@ public enum TestResult { PENDING("pending", (short) 5), NEGATIVE("negative", (short) 6), POSITIVE("positive", (short) 7), - FAILED("failed", (short) 8); + FAILED("failed", (short) 8), + REDEEMED("redeemed", (short) 9); static final Map names = Arrays.stream(TestResult.values()) .collect(Collectors.toMap(TestResult::getName, Function.identity())); diff --git a/src/main/java/app/coronawarn/quicktest/service/QuickTestDeletionService.java b/src/main/java/app/coronawarn/quicktest/service/QuickTestDeletionService.java index 002018c1..524e3c62 100644 --- a/src/main/java/app/coronawarn/quicktest/service/QuickTestDeletionService.java +++ b/src/main/java/app/coronawarn/quicktest/service/QuickTestDeletionService.java @@ -63,7 +63,7 @@ public void handleChunk(LocalDateTime deleteTimestamp, int chunkSize, int chunks quickTestChunk.forEach(quickTest -> sendResultToTestResultServer( quickTest.getTestResultServerHash(), - TestResult.FAILED.getValue(), + TestResult.REDEEMED.getValue(), deleteTimestamp.toEpochSecond(ZoneOffset.UTC), quickTest.getConfirmationCwa() != null ? quickTest.getConfirmationCwa() : false)); diff --git a/src/test/java/app/coronawarn/quicktest/service/QuickTestDeletionServiceTest.java b/src/test/java/app/coronawarn/quicktest/service/QuickTestDeletionServiceTest.java index e8f4a4f4..abf9fc45 100644 --- a/src/test/java/app/coronawarn/quicktest/service/QuickTestDeletionServiceTest.java +++ b/src/test/java/app/coronawarn/quicktest/service/QuickTestDeletionServiceTest.java @@ -60,13 +60,13 @@ void removeAllBeforeTest() { QuickTest quickTest = new QuickTest(); quickTest.setConfirmationCwa(true); quickTest.setTestResultServerHash(""); - quickTest.setTestResult((short) 8); + quickTest.setTestResult((short) 9); quickTest.setUpdatedAt(now); QuickTest quickTest1 = new QuickTest(); quickTest1.setConfirmationCwa(false); quickTest1.setTestResultServerHash(""); - quickTest1.setTestResult((short) 8); + quickTest1.setTestResult((short) 9); quickTest1.setUpdatedAt(now);