Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #40 from corona-warn-app/feat/add-uniquie-to-hashe…
Browse files Browse the repository at this point in the history
…d-guid

fix: add unique constraint to hashed guid
  • Loading branch information
ascheibal committed Aug 26, 2021
2 parents 4c1b0a2 + 65092e9 commit dfdbdaf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- dependencies -->
<spring.boot.version>2.4.5</spring.boot.version>
<spring-security.version>5.3.3.RELEASE</spring-security.version>
<spring-security.version>5.3.10.RELEASE</spring-security.version>
<spring.cloud.version>2020.0.1</spring.cloud.version>
<lombok.version>1.18.16</lombok.version>
<liquibase.version>3.10.0</liquibase.version>
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/db/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ databaseChangeLog:
- include:
file: changelog/v005-create-lab-id-claim-table.yml
relativeToChangelogFile: true
- include:
file: changelog/v006-add-unique-to-hashed-guid.yml
relativeToChangelogFile: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
databaseChangeLog:
- changeSet:
id: add-unique-to-hashed-guid
author: mschulte-tsi
changes:
- addUniqueConstraint:
columnNames: hashed_guid
tableName: dcc_registration
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ void testFindPendingDcc() throws NoSuchAlgorithmException, DccRegistrationServic
String registrationToken4 = "2".repeat(36);

String testId2 = "0".repeat(64);
String testId3 = "0".repeat(64);
String testId4 = "0".repeat(64);
String testId3 = "1".repeat(64);
String testId4 = "3".repeat(64);

when(verificationServerClientMock.result(eq(registrationToken))).thenReturn(new InternalTestResult(6, labId, testId, 0));
when(verificationServerClientMock.result(eq(new RegistrationToken(registrationToken2)))).thenReturn(new InternalTestResult(6, labId, testId2, 0));
Expand Down

0 comments on commit dfdbdaf

Please sign in to comment.