Commit Graph

74 Commits

Author SHA1 Message Date
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
Ivan Tomilov c500fbc423 Made all tests run on StatusChain instead of Rinkeby or Ropsten (#426)
The reason is that we don't currently have a possibility to run tests on public testnets without compromising accounts and funds on them.
2017-10-23 14:05:52 +03:00
b00ris 22fb4dfc30
integrate linters into travis 2017-10-23 13:28:48 +03:00
Adam Babik 1dcf30142d Merge branch 'develop' into feature/linter-in-travis 2017-10-23 12:07:41 +02:00
Eugene c304d3e7ae
Update PN tests 2017-10-22 20:39:56 +03:00
Eugene acd1c1527c
Basic unit testing for notification service 2017-10-22 20:39:55 +03:00
Frank Mueller 1c8d32c451 Ensuring node synchronisation to avoid "no suitable peers available" errors (#410)
During CI tests non-deterministic failures with "no suitable peers available" happened. Reason is a not finished synchronisation after starting of node.

Added and integrated an EnsureSychronization() almost solved it, but overlapped with new added EnsureNodeSync() in merged develop. Failure stayed, so exchange new algorithm in EsureNodeSync() with former one.
2017-10-21 20:04:07 +03:00
Adam Babik a21fd963de improve travis integration 2017-10-20 12:11:30 +02:00
b00ris e911666b5d Fix make lint warnings (#417)
fixed make lint warnings
cleared linter_exclude_list.txt
removed some commented code
fixed comments from #388
2017-10-20 12:06:22 +03:00
Ivan Tomilov 689e19e22f Fix test timeouts from 1m to 5m (#406) 2017-10-17 12:18:09 +03:00
Adam Babik 281b304edb Extract e2e tests to a separate package (#375)
This change moves our e2e tests into a separate package to make room for proper unit and integration tests.

This is Phase 1 described in #371.

Changes:

Makefile has separate directives to run unit/integration tests and e2e tests,
CI runs unit/integration tests first and then e2e tests,
E2e tests are in reliability order, i.e. the least reliable tests are run in the end to be sure that nothing else is broken,
Some tests are fixed or quarantined.
2017-10-11 17:20:51 +03:00
Ivan Daniluk 8623b52873 Add help command to Makefile (#370)
his PR adds some love to Makefile. It introduces a new help target, which dynamically builds usage output, with textual description of what target does. It supports ANSI colors and categories. It assumes that perl is installed in the system.
2017-10-03 14:54:19 +03:00
Ivan Tomilov 5f19c9cd0a Implemented sendAsync for js commands with a callback (#321)
Geth js commands coming through jail with a callback will now be executed truly asynchronously blocking jail only when an actual interaction with VM is performed.

Technically, it registers a new handler jeth.sendAsync which executes functions with callbacks asynchronously.

Changes include:

1. Send and SendAsync now use cell.VM instead of otto.Otto providing proper locking.
2. Unmarshalling in ExecuionPolicy.ExecuteWithClient is now done into var result interface{} instead of var result json.RawMessage because test case 0 of TestJailWhisper failed providing byte codes instead of 5.0.
3. Due to the asynchronous nature of web3 calls new weird timeouts in tests have been introduced. They may fail sometimes but I gave up trying to implement a more reliable and readable solution.
2017-09-18 15:13:32 +03:00
Adam Babik 8153d935d2 Improve geth/api tests (#328)
The goal of this PR is to make geth/api tests to finally pass from the beginning to the end. I tried to achieve it here by:

Removing calls to common.PanicAfter so that we know which tests fail the most,
Better sync of some tests using channels,
Small test improvements.
2017-09-15 13:35:31 +03:00
Adam Babik 8fb2424ea5 Port the transactions queue from go-ethereum to status-go (#261)
Now all transactions in both cases are waiting for CompleteTransaction or DiscardTransaction to proceed independently from their destination: upstream of local
2017-09-04 15:56:58 +03:00