From 1487c411b43286b4b01b2b7467b598167a0283ec Mon Sep 17 00:00:00 2001 From: Anthony Keenan Date: Mon, 12 Feb 2018 15:53:29 +0000 Subject: [PATCH] CORDA-716 - Update changelog for test package changes and provide upgrade script (#2434) * Update changelog for test package changes and provide upgrade script * Upgrade kotlin and java scripts --- docs/source/changelog.rst | 6 ++++++ tools/scripts/upgrade-test-packages.sh | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 tools/scripts/upgrade-test-packages.sh diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index d24525247e..b75b26ac85 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -189,6 +189,12 @@ UNRELEASED * Created new ``StartedMockNode`` and ``UnstartedMockNode`` classes which are wrappers around our MockNode implementation that expose relevant methods for testing without exposing internals, create these using a ``MockNetwork``. +* The test utils in ``Expect.kt``, ``SerializationTestHelpers.kt``, ``TestConstants.kt`` and ``TestUtils.kt`` have moved + from the ``net.corda.testing`` package to the ``net.corda.testing.core`` package, and ``FlowStackSnapshot.kt`` has moved to the + ``net.corda.testing.services`` package. Moving items out of the ``net.corda.testing.*`` package will help make it clearer which + parts of the api are stable. The bash script ``tools\scripts\update-test-packages.sh`` can be used to smooth the upgrade + process for existing projects. + .. _changelog_v1: Release 1.0 diff --git a/tools/scripts/upgrade-test-packages.sh b/tools/scripts/upgrade-test-packages.sh new file mode 100644 index 0000000000..1631126a11 --- /dev/null +++ b/tools/scripts/upgrade-test-packages.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +find $1 -type f \( -iname \*.kt -o -iname \*.java \) -exec sed -i " +s/net.corda.testing.\(\*\|generateStateRef\|freeLocalHostAndPort\|getFreeLocalPorts\|getTestPartyAndCertificate\|TestIdentity\|chooseIdentity\|singleIdentity\|TEST_TX_TIME\|DUMMY_NOTARY_NAME\|DUMMY_BANK_A_NAME\|DUMMY_BANK_B_NAME\|DUMMY_BANK_C_NAME\|BOC_NAME\|ALICE_NAME\|BOB_NAME\|CHARLIE_NAME\|DEV_INTERMEDIATE_CA\|DEV_ROOT_CA\|dummyCommand\|DummyCommandData\|MAX_MESSAGE_SIZE\|SerializationEnvironmentRule\|setGlobalSerialization\|expect\|sequence\|parallel\|replicate\|genericExpectEvents\)/net.corda.testing.core.\1/g +s/net.corda.testing.FlowStackSnapshotFactoryImpl/net.corda.testing.services.FlowStackSnapshotFactoryImpl/g +" '{}' \; \ No newline at end of file