status-go/t/e2e
Pedro Pombeiro 6cdea4ef97
Update codebase to leverage Whisper v6 (#703)
* Update project to use Whisper v6. Part of #638

* Revert "Add patch to downgrade usage of Whisper v6 to v5 in some geth 1.8.1 vendor files. Part of #665" - this reverts commit 6aefb4c8fd02dbcfffac6b69e8bb22b13ef86b6b.

* Enable light mode on Whisper v6 for non-mail servers. Part of #638

* Fix race condition in whisperv6/peer.go. Part of #665 (PR already accepted upstream for 1.8.2)

* Update bootnode addresses in staticnodes.json. Part of #638

* Add `shh.lightclient` flag and tests for bloom filter setting logic. Part of #638

* Move MakeTestNodeConfig to utils. Part of #638

* Reduce PoW in `whisper_jail_test.go` to fix flaky test. Part of #638
2018-03-02 10:25:30 +01:00
..
accounts Remove async operations from node manager (#584) 2018-02-09 14:37:56 +01:00
api Update codebase to leverage Whisper v6 (#703) 2018-03-02 10:25:30 +01:00
jail Remove GetObjectValue from JailCell interface #691 (#693) 2018-03-01 17:48:30 +01:00
node Update codebase to leverage Whisper v6 (#703) 2018-03-02 10:25:30 +01:00
rpc Update codebase to leverage Whisper v6 (#703) 2018-03-02 10:25:30 +01:00
transactions Update to go-ethereum 1.8.1 (#702) 2018-02-27 11:39:30 +01:00
whisper Update codebase to leverage Whisper v6 (#703) 2018-03-02 10:25:30 +01:00
README.md Update `make generate` target to account for new `_assets` folder 2018-02-26 16:04:40 +01:00
suites.go Update codebase to leverage Whisper v6 (#703) 2018-03-02 10:25:30 +01:00
testing.go Update codebase to leverage Whisper v6 (#703) 2018-03-02 10:25:30 +01:00

README.md

e2e

This package contains all e2e tests divided into subpackages which represents (or should represent) business domains like transactions, chat etc.

These tests are run against public testnets: Ropsten and Rinkeby.

e2e package contains a few utilities which are described in a godoc.

Flags

1. -network

The -network flag is used to provide either a network id or network name which specifies the ethereum network to use for running all test. It by default uses the StatusChain network.

Usage

First of all you need to export an ACCOUNT_PASSWORD environment variable. It should be a passphrase that was used to generate accounts used in tests. If you don't know this variable for default accounts you will have to create your own accounts and request some funds from rinkeby or ropsten faucet. Please see Preparation section for details.

To use the ropsten network for testing using network name:

ACCOUNT_PASSWORD=test go test -v ./t/e2e/... -p=1 -network=ropsten

To use the rinkeby network with chain id 4 for testing:

ACCOUNT_PASSWORD=test go test -v ./t/e2e/... -p=1 -network=4

Preparation

You will need geth in your PATH. Please visit: https://www.ethereum.org/cli. Once installed - generate 2 accounts and remember the passphrase for them, so run this command twice:

geth account new --keystore=static/keys/
Your new account is locked with a password. Please give a password. Do not forget this password.
Passphrase:
Repeat passphrase:
Address: {b6120ddd881593537c2bd4280bae509ec94b1a6b}

We expect that accounts will be named in a certain way:

pushd static/keys/
mv UTC--2018-01-26T13-46-53.657752811Z--b6120ddd881593537c2bd4280bae509ec94b1a6b test-account1.pk
mv UTC--2018-01-26T13-47-49.289567120Z--9f04dc05c4c3ec3b8b1f36f7d7d153f3934b1f07 test-account2.pk
popd

Update config for tests with new accounts static/config/public-chain-accounts.json:

{
  "Account1": {
    "Address": "0xb6120ddd881593537c2bd4280bae509ec94b1a6b"
  },
  "Account2": {
    "Address": "0x9f04dc05c4c3ec3b8b1f36f7d7d153f3934b1f07"
  }
}

Embed keys as a binary data, you will need to install npm tool and web3.js lib:

(cd _assets && npm install web3)
make generate

As a final step request funds from faucet for a chosen network:

Finally, you are ready to run tests!