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

Trigger service: Write packages to database if we have one #6424

Merged
merged 7 commits into from
Jun 19, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Test for repeated package uploads
  • Loading branch information
rohanjr committed Jun 19, 2020
commit 2315bb25338438953484bbf522ed729375e562f6
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,16 @@ abstract class AbstractTriggerServiceTest extends AsyncFlatSpec with Eventually
Future(succeed)
}

it should "allow repeated uploads of the same packages" in
withTriggerService(Some(dar)) { (uri: Uri, client: LedgerClient, ledgerProxy: Proxy) =>
for {
resp <- uploadDar(uri, darPath) // same dar as in initialization
_ <- parseResult(resp)
resp <- uploadDar(uri, darPath) // same dar again
_ <- parseResult(resp)
} yield succeed
}

it should "fail to start non-existent trigger" in withTriggerService(Some(dar)) {
(uri: Uri, client: LedgerClient, ledgerProxy: Proxy) =>
val expectedError = StatusCodes.UnprocessableEntity
Expand Down