Commit Graph

88 Commits

Author SHA1 Message Date
Igor Mandrigin d2df4bb323 Unbreak `make mock` command and compilation of our develop branch. 2018-03-29 17:51:00 +02:00
Pedro Pombeiro f329ad2256
Add `setup` makefile target and rename `race-check` to `test-e2e-race` for consistency
- `make setup` is used to simplify CI script
2018-03-27 17:07:06 +02:00
Pedro Pombeiro c4d7a6167e
Add `race-check` target to Makefile. Closes #710 (#769)
* Add `race-check` and `test-unit-race` target to Makefile. Closes #710
2018-03-27 14:38:41 +02:00
Adam Babik 8b264199c9
Enable metrics by default when building docker image (#774)
Prometheus metrics are enabled by default when running `make docker-image`.
2018-03-27 14:36:40 +02:00
Adrià Cidre e22fa36111
[#755] Restructure notifier interfaces 2018-03-23 09:55:05 +01:00
Pedro Pombeiro d84510de92
Remove unused JavaScript tests for RPC API (#737) 2018-03-16 18:49:42 +01:00
Frank Mueller 81c8669518
Code review for Mainnet (#706)
* Add debug log to test package t

* Add comments for test restrictions

* Add explicit errors for mainnet

* Panic instead of error in case of mainnet during tests

* Now panic with illegal network

* Validate the compiler flag for mainnet

* Made test for unset mainnet explicit

* Forgot to use my flag

* Linter has troubles with unused field

* Add default network id

In e2e tests there's no default anymore in go code. So ensure in Makefile.

* Fix dumb syntax error

* CI needs build with Mainnet

* Explicit rebuild only for tests

* No more separation of mainnet and testnet builds

* Build flags now set in Makefile
2018-03-15 12:36:28 +01:00
Adrià Cidre dea43dc4ed Makefile GOBIN to use absolute path 2018-03-01 17:18:12 +01:00
Pedro Pombeiro e4cbce12c4
Update to go-ethereum 1.8.1 (#702)
* Update `github.com/ethereum/go-ethereum` package to 1.8.1 branch. Part of #638
* Fix code due to some signature changes. Part of #638
* use upstream for whisper backend
* Add patch to downgrade usage of Whisper v6 to v5 in some geth 1.8.1 vendor files. Part of #638
* Take into account the DNS rebinding protection introduced in 1.8.0 by adding exception for localhost. Part of #638
* Add patches required for cross-compiled builds starting with geth 1.8.0. Only applied during build. Part of #638
* Update expected JSON result in `TestRegressionGetTransactionReceipt()` and `TestCallRawResultGetTransactionReceipt()`. Part of #665
* Fix some failing e2e tests. Part of #638
* Address comments in PR #702. Part of #638
2018-02-27 11:39:30 +01:00
Adam Babik 0a15c9ff9a
Configure mainnet nodes (#701)
Add mainnet static peers to static/config/staticpeers.json.
2018-02-26 19:36:04 +01:00
Pedro Pombeiro 0332465952
Update `make generate` target to account for new `_assets` folder 2018-02-26 16:04:40 +01:00
Pedro Pombeiro 134d01fcc1
Fix incorrect path in Makefile and run `make generate`. Part of #692 2018-02-22 12:19:31 +01:00
Alex Kohler c5b9f00467 Adding update-geth target (#673) 2018-02-20 19:04:25 +01:00
Dmitry Shulyak b2580c79d7
Add destructive tests (#646)
Network disconnect is introduced by removing default gateway, easily reversible condition.

On my local machine it takes 30 seconds for peers to reconnect after connectivity is restored. As you guess this is not an accident, and there is 30 seconds timeout for dial expiration. This dial expiration is used in p2p.Server to guarantee that peers are not dialed too often.

Additionally I added small script to Makefile to run such tests in docker environment, usage example:

```
make docker-test ARGS="./t/destructive/ -v -network=4"
```
2018-02-19 17:32:58 +02:00
Caner Çıdam 15c72f3c6b Apply geth patches on the fly #653 (#660) 2018-02-14 18:44:27 +01:00
Adam Babik 9ed2663b6e add docker-image-tag target to Makefile 2018-02-13 10:30:47 +01:00
Caner Çıdam a4c36fe96a Move non-go related files to the `_assets` folder. #621 (#630) 2018-02-09 14:38:18 +01:00
Sebastian Klier 70912ab8f6 Group tests in a dedicated testing package (#629) 2018-02-08 13:52:47 +01:00
Athos Ribeiro d58a06c323 Fix string printed after compilation is done (#505)
* Fix string printed after compilation is done

On GNU coreutils 8.27, echo prints the \n occurrences as literals. This
commit changes the calls to echo containing such character to calls to
printf, and appends another \n in the end of the line.

* Fix indent
2018-02-02 16:54:14 +01:00
Azer Koçulu 8b56060e21 Add vendor-check script, Makefile target and CI step (#581) 2018-02-01 18:14:51 +01:00
Adam Babik 89d89681a3
Add support for metrics (#558)
It adds support for metrics (expvar and Prometheus) along with docker-compose files to run a Whisper test cluster.
2018-01-30 12:51:48 +01:00
Dmitry Shulyak 680d0513b7 Refactoring of TxQueue and Manager (#530) 2018-01-25 21:59:21 -08:00
Daniel Nephin 755a646bd4 Use gometalinter config instead of makefile (#560) 2018-01-24 00:25:28 -08:00
Dmitry Shulyak 0771e7d1b7 Use single codepath for sending transactions to a local and remote nodes (#527)
- new EthereumTransactor that provides higher level API for working with ethereum network, and it is fully conformant with ethclient
- new test rpc service that improves flexibility and coverage of txqueue manager tests
- run complete transaction sequantially for each address
- go-ethereum: Get pending nonce from transaction pool
- add a patch with getting nonce from transaction pool
2018-01-18 17:55:17 +01:00
phcurtis 5a5c5d3a5c Merge wnode-status into statusd (#549) (#550) 2018-01-17 21:07:45 +01:00
Ivan Daniluk e9a0286523
Remove tput usage from Makefile (#531) 2018-01-09 18:46:54 +01:00
Pedro Pombeiro a79b1f6f7b xgo: Use statusteam/xgo Docker image, based on Go 1.9.2 instead of 1.8.3 (#520) 2018-01-04 10:47:10 +01:00
Adam Babik da4c0d1db9 Update Dockerfile (#521) 2018-01-03 20:50:19 +02:00
Adam Babik b7fb51d92a
Refactor shh_requestMessages method (#513) 2017-12-21 11:26:01 +01:00
Ivan Daniluk 8776f41627 Add a Makefile target for compilation into library (#475)
This PR adds a new target to Makefile to build a static library.
2017-11-29 22:30:16 +01:00
Adam Babik d6d5945ab4
Clean up Jenkinsfile-manual and Travis (#478)
Small clean up of Jenkinsfile-manual required after rebuilding Jenkins. Also improved .travis.yml a bit.
2017-11-29 07:48:40 +01:00
Adam Babik 74d3e5e625 Add workaround for testing/cgo issue (#469)
Test code in `lib` package requires cgo, but cgo is not allowed in `*_test.go` files, so we import a lot of testing-related code into a library which also has a lot of side-effects. This fix adds a build tag `e2e_test` as a workaround.
2017-11-22 15:06:14 +02:00
Ivan Daniluk 001a902407 Fix xgo invocation path after removal of env.sh (#466) 2017-11-21 15:40:52 +01:00
perissology f0beeb3829 fix failing tests in PRs from other repos, fixes #459 (#461)
Fix failing tests for users w/o access to the ACCOUNT_PASSWORD env variable. Disable e2e public network tests in Travis pull requests. Exclude lib dir from unit tests.
2017-11-20 10:21:30 -08:00
Evgeny Danienko 332e18a3a9
travis timeouts has been increased 2017-11-08 10:35:29 +03:00
Evgeny Danilenko 209d5fed74 Issue/fix public testnet tests #424 (#438)
* Accounts are now encrypted with a strong passphrase.
* The encrypted passphrase is stored in .travis.yml
* Public testnet tests are now run after tests on a private net
2017-11-07 12:46:11 -05:00
Adam Babik fb75054a35 Fix TestJailWhisper e2e test (#442)
We have a test called TestJailWhisper that checks various Whisper communication scenarios (like sending a message signed with a symmetric key, asymmetric keys etc.). However, it was written in a bit cryptic way, so I also refactored it.

Important changes:
* Cleaner way of importing keys using AddKeyPair() method in the test suite,
* Removed TestEncryptedAnonymousMessage because it is not needed anymore as "test 4" in TestJailWhisper was fixed,
* Bumped PoW to 2.0. 0.01 used by status-react makes this test flaky.
2017-11-06 11:04:45 -05:00
Alex Kohler c6e98b948b Get rid of build/env.sh Fixes #418 (#446)
Removing build/env.sh and relying on callers of Makefile to have their Go environment properly set up.
2017-11-04 00:20:17 -04:00
Ivan Daniluk 4536e99275 Improve statusd CLI usage (#441)
This PR refactors CLI API, removes obsolete commands and splits status code into smaller pieces:

* get rid of subcommands API (no ./status <command>)
* get rid of custom cli app package
* use stdlib flag package for handling command line flags
* move cross-compilation / mobile related code to lib/ package
* move wnode command into separate binary (cmd/node-status, name is subject to discuss)
* remove faucet command as obsolete
* update/add docs/READMES/wikis for new command line flags

It makes statusd code much simpler and smaller, separates concerns (lib, wnode and statusd are different things).
2017-11-03 18:07:13 -04:00
Ivan Tomilov 21beb685b4 Add -network flag for Makefile to chose a network to run tests on #430
PR adds test flag -network to e2e pacakge, for the selection of the desired blockchain network for running tests. It updates readme to demonstrates usage of flag.
2017-10-26 22:51:04 +03:00
Ivan Tomilov cf8aad90c0 Remove extra spacing 2017-10-26 22:50:19 +03:00
Alexander Ewetumo f0c992974c Add network id to make file 2017-10-26 20:03:53 +01:00
Ivan Tomilov 2897f0ec0f Merge pull request #390 from status-im/issue/refactor-api-notify-send-messages-#342
Refactor and little bit clean up Notify api:

Created interface and package "notification" and extracted related code into it
Set dependencies into constructor notificatotion.Manager
Mocks for notificatotion.Manager and FCMClient
Bacis unit tests for Notify and Send
Notify func is now deprecated
Notify users uses new API: message, Payload and a list of tokens
2017-10-26 20:54:12 +03:00
Alexander Ewetumo 61c277cccd Revise to seperate go test commands 2017-10-26 16:52:48 +01:00
Alexander Ewetumo 1cc90541da Update makefiles and make changes regards review 2017-10-26 14:11:24 +01:00
Alexander Ewetumo 41d883a564 Update makefile with network flag for needed test and fix failing tests 2017-10-25 23:36:47 +01:00
Alexander Ewetumo e80768a090 Swap GetNetworkIDHash/GetHeadHashForNetworkID 2017-10-25 23:24:01 +01:00
Alexander Ewetumo 4d356e0873 Update regards review 2017-10-25 23:07:50 +01:00
Ivan Tomilov d1c47c5358 Merge branch 'develop' into feature/linter-in-travis
# Conflicts:
#	.travis.yml
#	Makefile
2017-10-24 19:44:54 +03:00
Ivan Tomilov f80827dc1f Feature/integrate linters into ci#387 (#427)
Solves #387 linters was integrated into ci
Added inergration linters to CI
Important changes:
- new linter warnings was fixed
- extracted linters targets into separated mk file
2017-10-24 19:36:52 +03:00