Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete obsolete tests #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,59 +181,6 @@ void testGenerateReply(QueryContext<Docflow> docflowCxt) {
Assertions.assertEquals(lName, rName);
}

@ParameterizedTest
@DisplayName("send reply document by choosing its type with cloud cert")
@MethodSource("docflowFactory")
void testSendOneReplyWithCloudSign(QueryContext<Docflow> docflowCxt) {
Docflow docflow = docflowCxt.getDocflow();

Document document = docflow.getDocuments()
.stream()
.filter(Document::isNeedToReply)
.findFirst()
.orElse(null);

if (document == null) {
log.warning("Docflow " + docflow.getId() + " has no reply options");
return;
}

Link generateLink = document.getReplyLinks()[0];

GenerateReplyDocumentRequestData certificateBase64 = new GenerateReplyDocumentRequestData()
.certificateBase64(cloudCert.get().getContent());

client = engine.getAuthorizedHttpClient();

ReplyDocument reply = client.followPostLink(
generateLink.getHref(),
certificateBase64,
ReplyDocument.class
);

SignInitiation signInitiation = client.followPostLink(
reply.getCloudSignLink().getHref(),
SignInitiation.class
);

HashMap<String, Object> queryParams = new HashMap<>();
queryParams.put("code", codeProvider.get().apply(signInitiation.getRequestId()));
queryParams.put("requestId", signInitiation.getRequestId());

client.followPostLink(
reply.getCloudSignConfirmLink().getHref(),
queryParams,
null,
SignConfirmResultData.class
);

client.followPostLink(
reply.getSendLink().getHref(),
new SenderIp(engine.getUserIPProvider().userIP()),
Docflow.class
);
}

@Disabled("print it with decrypt")
@ParameterizedTest
@MethodSource("docflowFactory")
Expand Down
Loading