-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FAB-16921 Generate ledger data from release-1.3
This CR enables for generating ledger data from release-1.3 so that this generated data can be tested against later releases Change-Id: Ia1fd21c00fb48fc5f9b1bc6779d3ff720eef1651 Signed-off-by: manish <manish.sethi@gmail.com>
- Loading branch information
1 parent
1b6246b
commit 6fd5729
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
Copyright IBM Corp. All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package tests | ||
|
||
import "testing" | ||
|
||
// TestGenerate13SampleDataForBackwardCompatibility is very similar to TestLedgerAPIs | ||
// however, this doesnot remove the ledgers created by the test. This is because, the sole | ||
// purpose of this test is to generate the ledgers from v1.3 code so that they can manually be | ||
// copied to future releases to make sure that the future releases can work with and can rebuild different | ||
// ledger components (state/indexes etc.) for the ledger that is built using v1.3 codebase | ||
// So, this test is marked as skipped in general. | ||
// For producing the v1.3 ledger, | ||
// 1) Make sure that the path '<peer.fileSystemPath>/ledgersData' ('/tmp/fabric/ledgertests/ledgersData') does not exist | ||
// 2) commentout the line 't.Skip()' and run this test in isolation | ||
// 3) move the folder '<peer.fileSystemPath>/ledgersData' to a separate place for copying over to a future release codebase | ||
func TestGenerate13SampleDataForBackwardCompatibility(t *testing.T) { | ||
t.Skip() | ||
newEnv(defaultConfig, t) | ||
|
||
// create two ledgers | ||
h1 := newTestHelperCreateLgr("ledger1", t) | ||
h2 := newTestHelperCreateLgr("ledger2", t) | ||
|
||
// populate ledgers with sample data | ||
dataHelper := newSampleDataHelper(t) | ||
dataHelper.populateLedger(h1) | ||
dataHelper.populateLedger(h2) | ||
|
||
// verify contents in both the ledgers | ||
dataHelper.verifyLedgerContent(h1) | ||
dataHelper.verifyLedgerContent(h2) | ||
} |