Skip to content

Commit

Permalink
chore: setupNetwork() in integration_test should accept a bool argume…
Browse files Browse the repository at this point in the history
…nt for debug
  • Loading branch information
randomshinichi committed Jul 24, 2019
1 parent 8d2bcb3 commit 7d2db5f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion integration_test/aens_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func randomName(length int) string {
}

func TestAENSWorkflow(t *testing.T) {
node := setupNetwork(t, privatenetURL)
node := setupNetwork(t, privatenetURL, false)
alice, bob := setupAccounts(t)
aensAlice := aeternity.NewContext(node, alice.Address)

Expand Down
4 changes: 2 additions & 2 deletions integration_test/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ func init() {
}

func TestAPI(t *testing.T) {
privateNet := setupNetwork(t, privatenetURL)
testNet := setupNetwork(t, testnetURL)
privateNet := setupNetwork(t, privatenetURL, false)
testNet := setupNetwork(t, testnetURL, false)

alice, bob := setupAccounts(t)

Expand Down
2 changes: 1 addition & 1 deletion integration_test/contract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

func TestContracts(t *testing.T) {
alice, _ := setupAccounts(t)
aeNode := setupNetwork(t, privatenetURL)
aeNode := setupNetwork(t, privatenetURL, false)
contractsAlice := aeternity.NewContext(aeNode, alice.Address)

var ctID string
Expand Down
2 changes: 1 addition & 1 deletion integration_test/oracle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func TestOracleWorkflow(t *testing.T) {
alice, _ := setupAccounts(t)
client := setupNetwork(t, privatenetURL)
client := setupNetwork(t, privatenetURL, false)

oracleAlice := aeternity.NewContext(client, alice.Address)

Expand Down
2 changes: 1 addition & 1 deletion integration_test/spend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
// Tests for 2 things: sending an amount that is max uint64, and that the node accepts the minimum fee
// that is calculated via tx.EstimateFee().
func TestSpendTx(t *testing.T) {
node := setupNetwork(t, privatenetURL)
node := setupNetwork(t, privatenetURL, false)
alice, bob := setupAccounts(t)

amount := utils.RequireIntFromString("18446744073709551615") // max uint64
Expand Down
4 changes: 2 additions & 2 deletions integration_test/testsetup.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ var privatenetURL = "http://localhost:3013"
var testnetURL = "http://sdk-testnet.aepps.com"
var networkID = "ae_docker"

func setupNetwork(t *testing.T, nodeURL string) *aeternity.Node {
func setupNetwork(t *testing.T, nodeURL string, debug bool) *aeternity.Node {
aeternity.Config.Node.NetworkID = networkID
client := aeternity.NewNode(nodeURL, false)
client := aeternity.NewNode(nodeURL, debug)
t.Logf("nodeURL: %s, networkID: %s", nodeURL, aeternity.Config.Node.NetworkID)
return client
}
Expand Down

0 comments on commit 7d2db5f

Please sign in to comment.