Commit Graph

57 Commits

Author SHA1 Message Date
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
Marin 97bba3d835 Feature/profiling #257 (#264) 2017-09-01 21:09:11 +07:00
Ewetumo Alexander fb7738b1bb Add http enable flag for Node, closes #191
* Add http enable flag for Node

* Fix errors with json test data

* Refactor changes with regards to review comments

* Return appropriate errors for novalue set

* Update changes with regard to config

* Update tests timeout value for makefile ci

* Add RPCEnabled for json config in api test

* Resolve test with RPCEnabled changes

* Remove RPCEnabled flag from unconcerned tests
2017-07-13 13:54:10 +07:00
Victor Farazdagi b61f0d0000 fixes race condition in node stop method 2017-05-24 17:13:30 +03:00
Victor Farazdagi 349103de1a major refactoring: node manager, tx queue, accounts, jail
- node: signals and node reset, fixes #152
- tests update (testify is used)
- node manager refactored, race conditions fixed
- node wrapper has been removed, we rely on go-ethereum node now
- tx queue refactored
- jail refactored
- backend and API introduced
2017-05-24 00:29:20 +03:00
Victor Farazdagi 2f0c93fd3b refactor: linters + recommendations applied, closes #146 2017-05-15 08:19:46 +03:00
Victor Farazdagi 8876fd04d3 whisper: JavaScript tests to cover updated Whisper API 2017-05-14 02:34:08 +03:00
Victor Farazdagi 21344af199 geth, jail: embed static resources, closes #131 2017-04-28 11:50:12 +03:00
Victor Farazdagi b130d586ca cmd/statusd: expose LES, SHH, Swarm. Closes #128 2017-04-01 10:08:08 +03:00
Victor Farazdagi 5615ec40d6 geth, geth/params: customized logger implemented 2017-03-29 00:48:09 +03:00
Victor Farazdagi 031eeb33b8 geth/params: node settings implemented #116 2017-03-17 17:38:22 +03:00
Victor Farazdagi 34b19e6af9 geth: optimizes tests 2017-03-16 10:40:17 +03:00
Victor Farazdagi 57fb99c4ca jail, params: moved into geth package, refactored 2017-03-16 10:40:17 +03:00
Victor Farazdagi 0d5a6911ce Arch dependent status headers. Fixes #80 2016-12-16 02:00:08 +03:00
Victor Farazdagi e5bb6a24f7 replaces dependency on go-ethereum "cmd/*" packages. Fixes #72 2016-12-08 01:04:09 +03:00
Victor Farazdagi 1f6e59d160 DiscardTransactions() + CompleteTransactions(). Fixes #32 2016-11-12 21:26:33 +03:00
Victor Farazdagi 286a8fc344 Allow conditionally build for Testnet/Mainnet. Closes #40 2016-10-13 14:46:54 +03:00
Victor Farazdagi 67c0315dbc Travis CI tests pass now 2016-09-28 18:52:30 +03:00