Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:open-eid/SiGa into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
siimsuu1 committed Dec 10, 2020
2 parents d78f963 + c2ad80a commit 40aa2c4
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void signWithSmartIdWithCertificateChoiceSuccessfullyLithuania() throws E
public void signWithSmartIdCertificateChoiceMultipleSignaturesPerContainerSuccessfully() throws Exception {
postCreateContainer(flow, asicContainersDataRequestWithDefault());

Response certificateChoice1 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010005", "LT"));
Response certificateChoice1 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010005", "EE"));
String generatedCertificateId1 = certificateChoice1.as(CreateContainerSmartIdCertificateChoiceResponse.class).getGeneratedCertificateId();
pollForSidCertificateStatus(flow, generatedCertificateId1);

Expand All @@ -109,7 +109,7 @@ public void signWithSmartIdCertificateChoiceMultipleSignaturesPerContainerSucces
String signatureId1 = signingRequest1.as(CreateContainerSmartIdSigningResponse.class).getGeneratedSignatureId();
pollForSidSigning(flow, signatureId1);

Response certificateChoice2 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010005", "LT"));
Response certificateChoice2 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010005", "EE"));
String generatedCertificateId2 = certificateChoice2.as(CreateContainerSmartIdCertificateChoiceResponse.class).getGeneratedCertificateId();
pollForSidCertificateStatus(flow, generatedCertificateId2);

Expand All @@ -129,7 +129,7 @@ public void signWithSmartIdCertificateChoiceMultipleSignaturesPerContainerSucces
public void signWithSmartIdCertificateChoiceRetryAfterUserCancel() throws Exception {
postCreateContainer(flow, asicContainersDataRequestWithDefault());

Response certificateChoice1 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010016", "LT"));
Response certificateChoice1 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010016", "EE"));
String generatedCertificateId1 = certificateChoice1.as(CreateContainerSmartIdCertificateChoiceResponse.class).getGeneratedCertificateId();
pollForSidCertificateStatus(flow, generatedCertificateId1);

Expand All @@ -138,7 +138,7 @@ public void signWithSmartIdCertificateChoiceRetryAfterUserCancel() throws Except
String signatureId1 = signingRequest1.as(CreateContainerSmartIdSigningResponse.class).getGeneratedSignatureId();
pollForSidSigning(flow, signatureId1);

Response certificateChoice2 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010005", "LT"));
Response certificateChoice2 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010005", "EE"));
String generatedCertificateId2 = certificateChoice2.as(CreateContainerSmartIdCertificateChoiceResponse.class).getGeneratedCertificateId();
pollForSidCertificateStatus(flow, generatedCertificateId2);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void signWithSmartIdWithCertificateChoiceSuccessfullyLithuania() throws E
public void signWithSmartIdCertificateChoiceMultipleSignaturesPerContainerSuccessfully() throws Exception {
postCreateContainer(flow, hashcodeContainersDataRequestWithDefault());

Response certificateChoice1 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010005", "LT"));
Response certificateChoice1 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010005", "EE"));
String generatedCertificateId1 = certificateChoice1.as(CreateHashcodeContainerSmartIdCertificateChoiceResponse.class).getGeneratedCertificateId();
pollForSidCertificateStatus(flow, generatedCertificateId1);

Expand All @@ -102,7 +102,7 @@ public void signWithSmartIdCertificateChoiceMultipleSignaturesPerContainerSucces
String signatureId1 = signingRequest1.as(CreateHashcodeContainerSmartIdSigningResponse.class).getGeneratedSignatureId();
pollForSidSigning(flow, signatureId1);

Response certificateChoice2 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010005", "LT"));
Response certificateChoice2 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010005", "EE"));
String generatedCertificateId2 = certificateChoice2.as(CreateHashcodeContainerSmartIdCertificateChoiceResponse.class).getGeneratedCertificateId();
pollForSidCertificateStatus(flow, generatedCertificateId2);

Expand All @@ -122,7 +122,7 @@ public void signWithSmartIdCertificateChoiceMultipleSignaturesPerContainerSucces
public void signWithSmartIdCertificateChoiceRetryAfterUserCancel() throws Exception {
postCreateContainer(flow, hashcodeContainersDataRequestWithDefault());

Response certificateChoice1 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010016", "LT"));
Response certificateChoice1 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010016", "EE"));
String generatedCertificateId1 = certificateChoice1.as(CreateHashcodeContainerSmartIdCertificateChoiceResponse.class).getGeneratedCertificateId();
pollForSidCertificateStatus(flow, generatedCertificateId1);

Expand All @@ -131,7 +131,7 @@ public void signWithSmartIdCertificateChoiceRetryAfterUserCancel() throws Except
String signatureId1 = signingRequest1.as(CreateHashcodeContainerSmartIdSigningResponse.class).getGeneratedSignatureId();
pollForSidSigning(flow, signatureId1);

Response certificateChoice2 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010005", "LT"));
Response certificateChoice2 = postSidCertificateChoice(flow, smartIdCertificateChoiceRequest("10101010005", "EE"));
String generatedCertificateId2 = certificateChoice2.as(CreateHashcodeContainerSmartIdCertificateChoiceResponse.class).getGeneratedCertificateId();
pollForSidCertificateStatus(flow, generatedCertificateId2);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ public void uploadContainerWithDuplicateDataFilesInSignature() throws Exception
expectError(response, 400, DUPLICATE_DATA_FILE);
}

@Test
public void uploadContainerWithInvalidStructure() throws Exception {
Response response = postUploadContainer(flow, hashcodeContainerRequestFromFile("hashcode_invalid_structure.asice"));
expectError(response, 400, INVALID_CONTAINER_EXCEPTION);
}

@Test
public void uploadContainerWithInvalidDatafileXmlStructure() throws Exception {
Response response = postUploadContainer(flow, hashcodeContainerRequestFromFile("hashcodeWrongFileStructureInDatafileDescriptorFile.asice"));
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 40aa2c4

Please sign in to comment.