diff --git a/test/data/assetcreator/assetCreator.go b/test/data/contracts/assetcreator/assetCreator.go similarity index 100% rename from test/data/assetcreator/assetCreator.go rename to test/data/contracts/assetcreator/assetCreator.go diff --git a/test/data/assetcreator/chaincode/smartcontract.go b/test/data/contracts/assetcreator/chaincode/smartcontract.go similarity index 100% rename from test/data/assetcreator/chaincode/smartcontract.go rename to test/data/contracts/assetcreator/chaincode/smartcontract.go diff --git a/test/data/assetcreator/go.mod b/test/data/contracts/assetcreator/go.mod similarity index 100% rename from test/data/assetcreator/go.mod rename to test/data/contracts/assetcreator/go.mod diff --git a/test/data/assetcreator/go.sum b/test/data/contracts/assetcreator/go.sum similarity index 100% rename from test/data/assetcreator/go.sum rename to test/data/contracts/assetcreator/go.sum diff --git a/test/data/simplestorage/simple_storage.json b/test/data/contracts/simplestorage/simple_storage.json similarity index 100% rename from test/data/simplestorage/simple_storage.json rename to test/data/contracts/simplestorage/simple_storage.json diff --git a/test/e2e/deploy_chaincode.sh b/test/e2e/deploy_chaincode.sh index 9595eba773..8298a4071f 100755 --- a/test/e2e/deploy_chaincode.sh +++ b/test/e2e/deploy_chaincode.sh @@ -11,7 +11,7 @@ if [ -z "$CHAINCODE_NAME" ]; then fi TEST_DIR="$(cd "$(dirname $0)/.." && pwd)" -CHAINCODE="$TEST_DIR/data/assetcreator" +CHAINCODE="$TEST_DIR/data/contracts/assetcreator" CHAINCODE_VERSION=1.0 CHANNEL=firefly diff --git a/test/e2e/multiparty/ethereum_contract_test.go b/test/e2e/multiparty/ethereum_contract_test.go index fb5de8643c..bf1cfbcf27 100644 --- a/test/e2e/multiparty/ethereum_contract_test.go +++ b/test/e2e/multiparty/ethereum_contract_test.go @@ -108,13 +108,15 @@ func simpleStorageFFIGet() *fftypes.FFIMethod { } } -func deployContract(t *testing.T, stackName string) string { - out, err := exec.Command("ff", "deploy", "ethereum", stackName, "../../data/simplestorage/simple_storage.json").Output() +func deployContract(t *testing.T, stackName, contract string) string { + out, err := exec.Command("ff", "deploy", "ethereum", stackName, "../../data/contracts/"+contract).Output() require.NoError(t, err) var output map[string]interface{} err = json.Unmarshal(out, &output) require.NoError(t, err) - return output["address"].(string) + address := output["address"].(string) + t.Logf("Contract address: %s", address) + return address } type EthereumContractTestSuite struct { @@ -132,7 +134,7 @@ func (suite *EthereumContractTestSuite) SetupSuite() { suite.ethClient = e2e.NewResty(suite.T()) suite.ethClient.SetBaseURL(fmt.Sprintf("http://localhost:%d", stack.Members[0].ExposedConnectorPort)) suite.ethIdentity = suite.testState.org1key.Value - suite.contractAddress = deployContract(suite.T(), stack.Name) + suite.contractAddress = deployContract(suite.T(), stack.Name, "simplestorage/simple_storage.json") res, err := e2e.CreateFFI(suite.T(), suite.testState.client1, simpleStorageFFI()) suite.interfaceID = fftypes.MustParseUUID(res.(map[string]interface{})["id"].(string))