mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 08:48:21 +03:00
Adapted InterfaceSubscriptionsIT to logging changes. (#17013)
This commit is contained in:
parent
edd1a5f62a
commit
5f46600a90
@ -482,14 +482,18 @@ class InterfaceSubscriptionsIT extends LedgerTestSuite {
|
||||
assertEquals(
|
||||
"1 and 3 produce the same views (but not the same create arguments)",
|
||||
// do not check on details since tid is contained and it is expected to be different
|
||||
transactions1.map(updateTransaction(emptyDetails = true)),
|
||||
transactions3.map(
|
||||
updateTransaction(
|
||||
emptyContractKey = true,
|
||||
emptyCreateArguments = true,
|
||||
emptyDetails = true,
|
||||
transactions1
|
||||
.map(updateTransaction(emptyDetails = true))
|
||||
.map(hideTraceIdFromStatusMessages),
|
||||
transactions3
|
||||
.map(
|
||||
updateTransaction(
|
||||
emptyContractKey = true,
|
||||
emptyCreateArguments = true,
|
||||
emptyDetails = true,
|
||||
)
|
||||
)
|
||||
),
|
||||
.map(hideTraceIdFromStatusMessages),
|
||||
)
|
||||
}
|
||||
})
|
||||
@ -717,6 +721,36 @@ class InterfaceSubscriptionsIT extends LedgerTestSuite {
|
||||
)
|
||||
}
|
||||
|
||||
private def hideTraceIdFromStatusMessages(
|
||||
tx: com.daml.ledger.api.v1.transaction.Transaction
|
||||
): Transaction = {
|
||||
tx.copy(
|
||||
events = tx.events.map { event =>
|
||||
event.copy(event = event.event match {
|
||||
case created: Event.Created =>
|
||||
created.copy(value =
|
||||
created.value.copy(
|
||||
interfaceViews = created.value.interfaceViews.map(view =>
|
||||
view.copy(
|
||||
viewStatus = view.viewStatus.map(status =>
|
||||
status.copy(message =
|
||||
status.message.replaceFirst(
|
||||
"""DAML_INTERPRETATION_ERROR\(9,.{8}\)""",
|
||||
"DAML_INTERPRETATION_ERROR(9,0)",
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
case other => other
|
||||
})
|
||||
},
|
||||
commandId = "",
|
||||
)
|
||||
}
|
||||
|
||||
private def assertViewFailed(views: Seq[InterfaceView], interfaceId: Identifier): Unit = {
|
||||
val viewSearch = views.find(_.interfaceId.contains(interfaceId))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user