mirror of
https://github.com/corda/corda.git
synced 2025-06-01 15:10:54 +00:00
CORDA-2280 Move assumeFalse
in SignatureConstraintVersioningTests
(#5076)
A test was failing due to `assumeFalse` (to stop a test running on windows) being inside of a `assertThatExceptionOfType` block. The exception it threw was consumed by the block instead of junit.
This commit is contained in:
parent
531493325c
commit
c163365229
@ -99,6 +99,7 @@ class SignatureConstraintVersioningTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `auto migration from WhitelistConstraint to SignatureConstraint`() {
|
fun `auto migration from WhitelistConstraint to SignatureConstraint`() {
|
||||||
|
assumeFalse(System.getProperty("os.name").toLowerCase().startsWith("win")) // See NodeStatePersistenceTests.kt.
|
||||||
val transaction =
|
val transaction =
|
||||||
upgradeCorDappBetweenTransactions(oldUnsignedCordapp, newCordapp, listOf(oldUnsignedCordapp, newCordapp))
|
upgradeCorDappBetweenTransactions(oldUnsignedCordapp, newCordapp, listOf(oldUnsignedCordapp, newCordapp))
|
||||||
assertEquals(1, transaction.outputs.size)
|
assertEquals(1, transaction.outputs.size)
|
||||||
@ -107,6 +108,7 @@ class SignatureConstraintVersioningTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `auto migration from WhitelistConstraint to SignatureConstraint fail for not whitelisted signed JAR`() {
|
fun `auto migration from WhitelistConstraint to SignatureConstraint fail for not whitelisted signed JAR`() {
|
||||||
|
assumeFalse(System.getProperty("os.name").toLowerCase().startsWith("win")) // See NodeStatePersistenceTests.kt.
|
||||||
assertThatExceptionOfType(CordaRuntimeException::class.java).isThrownBy {
|
assertThatExceptionOfType(CordaRuntimeException::class.java).isThrownBy {
|
||||||
upgradeCorDappBetweenTransactions(oldUnsignedCordapp, newCordapp, emptyList())
|
upgradeCorDappBetweenTransactions(oldUnsignedCordapp, newCordapp, emptyList())
|
||||||
}.withMessageContaining("Selected output constraint: $WhitelistedByZoneAttachmentConstraint not satisfying")
|
}.withMessageContaining("Selected output constraint: $WhitelistedByZoneAttachmentConstraint not satisfying")
|
||||||
@ -121,7 +123,6 @@ class SignatureConstraintVersioningTests {
|
|||||||
newCordapp: CustomCordapp,
|
newCordapp: CustomCordapp,
|
||||||
whiteListedCordapps: List<CustomCordapp>
|
whiteListedCordapps: List<CustomCordapp>
|
||||||
): CoreTransaction {
|
): CoreTransaction {
|
||||||
assumeFalse(System.getProperty("os.name").toLowerCase().startsWith("win")) // See NodeStatePersistenceTests.kt.
|
|
||||||
|
|
||||||
val attachmentHashes = whiteListedCordapps.map { Files.newInputStream(it.jarFile).readFully().sha256() }
|
val attachmentHashes = whiteListedCordapps.map { Files.newInputStream(it.jarFile).readFully().sha256() }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user