@@ -28,7 +28,7 @@ import (
28
28
)
29
29
30
30
func TestBlockfileMgrBlockReadWrite (t * testing.T ) {
31
- env := newTestEnv (t , NewConf ("/tmp/fabric/ledgertests" , 0 ))
31
+ env := newTestEnv (t , NewConf (testPath , 0 ))
32
32
defer env .Cleanup ()
33
33
blkfileMgrWrapper := newTestBlockfileWrapper (env , "testLedger" )
34
34
defer blkfileMgrWrapper .close ()
@@ -47,7 +47,7 @@ func TestBlockfileMgrCrashDuringWriting(t *testing.T) {
47
47
48
48
func testBlockfileMgrCrashDuringWriting (t * testing.T , numBlocksBeforeCheckpoint int ,
49
49
numBlocksAfterCheckpoint int , numLastBlockBytes int , numPartialBytesToWrite int ) {
50
- env := newTestEnv (t , NewConf ("/tmp/fabric/ledgertests" , 0 ))
50
+ env := newTestEnv (t , NewConf (testPath , 0 ))
51
51
defer env .Cleanup ()
52
52
ledgerid := "testLedger"
53
53
blkfileMgrWrapper := newTestBlockfileWrapper (env , ledgerid )
@@ -92,7 +92,7 @@ func testBlockfileMgrCrashDuringWriting(t *testing.T, numBlocksBeforeCheckpoint
92
92
}
93
93
94
94
func TestBlockfileMgrBlockIterator (t * testing.T ) {
95
- env := newTestEnv (t , NewConf ("/tmp/fabric/ledgertests" , 0 ))
95
+ env := newTestEnv (t , NewConf (testPath , 0 ))
96
96
defer env .Cleanup ()
97
97
blkfileMgrWrapper := newTestBlockfileWrapper (env , "testLedger" )
98
98
defer blkfileMgrWrapper .close ()
@@ -120,7 +120,7 @@ func testBlockfileMgrBlockIterator(t *testing.T, blockfileMgr *blockfileMgr,
120
120
}
121
121
122
122
func TestBlockfileMgrBlockchainInfo (t * testing.T ) {
123
- env := newTestEnv (t , NewConf ("/tmp/fabric/ledgertests" , 0 ))
123
+ env := newTestEnv (t , NewConf (testPath , 0 ))
124
124
defer env .Cleanup ()
125
125
blkfileMgrWrapper := newTestBlockfileWrapper (env , "testLedger" )
126
126
defer blkfileMgrWrapper .close ()
@@ -135,7 +135,7 @@ func TestBlockfileMgrBlockchainInfo(t *testing.T) {
135
135
}
136
136
137
137
func TestBlockfileMgrGetTxById (t * testing.T ) {
138
- env := newTestEnv (t , NewConf ("/tmp/fabric/ledgertests" , 0 ))
138
+ env := newTestEnv (t , NewConf (testPath , 0 ))
139
139
defer env .Cleanup ()
140
140
blkfileMgrWrapper := newTestBlockfileWrapper (env , "testLedger" )
141
141
defer blkfileMgrWrapper .close ()
@@ -156,7 +156,7 @@ func TestBlockfileMgrGetTxById(t *testing.T) {
156
156
}
157
157
158
158
func TestBlockfileMgrRestart (t * testing.T ) {
159
- env := newTestEnv (t , NewConf ("/tmp/fabric/ledgertests" , 0 ))
159
+ env := newTestEnv (t , NewConf (testPath , 0 ))
160
160
defer env .Cleanup ()
161
161
ledgerid := "testLedger"
162
162
blkfileMgrWrapper := newTestBlockfileWrapper (env , ledgerid )
@@ -182,7 +182,7 @@ func TestBlockfileMgrFileRolling(t *testing.T) {
182
182
}
183
183
184
184
maxFileSie := int (0.75 * float64 (size ))
185
- env := newTestEnv (t , NewConf ("/tmp/fabric/ledgertests" , maxFileSie ))
185
+ env := newTestEnv (t , NewConf (testPath , maxFileSie ))
186
186
defer env .Cleanup ()
187
187
ledgerid := "testLedger"
188
188
blkfileMgrWrapper := newTestBlockfileWrapper (env , ledgerid )
0 commit comments