Skip to content

Commit

Permalink
Group test contracts into a folder
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
  • Loading branch information
awrichar committed Jul 12, 2022
1 parent 7a81821 commit b14dcd7
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 5 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/e2e/deploy_chaincode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions test/e2e/multiparty/ethereum_contract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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))
Expand Down

0 comments on commit b14dcd7

Please sign in to comment.