@@ -236,7 +236,9 @@ func updateGopath(t *testing.T, path string) func() {
236
236
}
237
237
238
238
func TestGetDeploymentPayload (t * testing.T ) {
239
- testdataPath , err := filepath .Abs ("testdata" )
239
+ const testdata = "github.com/hyperledger/fabric/core/chaincode/platforms/golang/testdata/src/"
240
+
241
+ gopath , err := getGopath ()
240
242
require .NoError (t , err )
241
243
242
244
platform := & Platform {}
@@ -246,13 +248,13 @@ func TestGetDeploymentPayload(t *testing.T) {
246
248
path string
247
249
succ bool
248
250
}{
249
- {gopath : testdataPath , path : "chaincodes/noop" , succ : true },
250
- {gopath : testdataPath , path : "bad/chaincodes/noop" , succ : false },
251
- {gopath : testdataPath , path : "chaincodes/BadImport" , succ : false },
252
- {gopath : testdataPath , path : "chaincodes/BadMetadataInvalidIndex" , succ : false },
253
- {gopath : testdataPath , path : "chaincodes/BadMetadataUnexpectedFolderContent" , succ : false },
254
- {gopath : testdataPath , path : "chaincodes/BadMetadataIgnoreHiddenFile" , succ : true },
255
- {gopath : testdataPath , path : "chaincodes/empty/" , succ : false },
251
+ {gopath : gopath , path : testdata + "chaincodes/noop" , succ : true },
252
+ {gopath : gopath , path : testdata + "bad/chaincodes/noop" , succ : false },
253
+ {gopath : gopath , path : testdata + "chaincodes/BadImport" , succ : false },
254
+ {gopath : gopath , path : testdata + "chaincodes/BadMetadataInvalidIndex" , succ : false },
255
+ {gopath : gopath , path : testdata + "chaincodes/BadMetadataUnexpectedFolderContent" , succ : false },
256
+ {gopath : gopath , path : testdata + "chaincodes/BadMetadataIgnoreHiddenFile" , succ : true },
257
+ {gopath : gopath , path : testdata + "chaincodes/empty/" , succ : false },
256
258
}
257
259
258
260
for _ , tst := range tests {
0 commit comments