50 Commits

Author SHA1 Message Date
Troy McConaghy
abdd23f5a6 Problem: Source files contain no license info (#2455)
* Problem: Source files contain no license info

Solution: Add comments with SPDX license info to source files

* Python 3 files don't need # -*- coding: utf-8 -*-
2018-08-16 12:31:32 +02:00
Zachary Bowen
3760824261 Create dynamic upsert validator commands (#2446)
* Problem: Need a method to initiate a new upsert-validator election

Solution: Added subcommand `new` to `upsert_validator`

* Problem: Changes to upsert-validator needed to be reflected in the docs

Solution: Wrote a section for `upsert-validator new`
2018-08-09 17:29:21 +02:00
Vanshdeep Singh
2e9a9b1121 Problem: Validator set not tracked by BigchainDB (#2436)
* Problem: Validator set not tracked by BigchainDB

Solution: BigchainDB depends on tendermint's RPC API to get the validator set
which is not avaiable during replay so the validators set should be tracked
inside BigchainDB

* Problem: Unclear code and documentation

Solution: Fix decode_validator and docs strings

* Problem: Doc strings missing

Solution: Add doc string for store_validato_set
2018-08-06 11:37:43 +02:00
Zachary Bowen
2386ca9d71 Refactor tendermint directory to project root (#2401)
* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Fixed flake8 complaint about too many blank lines

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Updating from master changed BigchainDB.process_post_response to a private method, so I had to align with that.

* Fixed a couple stale references to bigchaindb.Bigchain in docstrings

* Missed a reference to `Bigchain` in a patch call...

* Problem: BigchainDB class should be part of project root

Solution: Removed the /tendermint directory and moved its contents to project root

* Problem: Flake8 complained that imports were not at the top of the file

Solution: Had to play around with the order of imports to avoid cyclic dependencies, but its working and style compliant now

* Problem: Stale reference to /tendermint directory in the index

Solution: Removed the references to /tendermint

* Problem: Flake8 complaining of unused import in __init__.py

Solution: The import is there so I can import App directly from bigchaindb, rather than from bigchaindb.core (which I think improves code readability. I added a # noqa to silence Flake8.

* Problem: Stale references to `bigchaindb.tendermint.BigchainDB` in the rst files cause Sphinx to fail

Solution: Updated the autodoc files to use `bigchaindb.BigchainDB` instead

* Problem: Stale reference to the `tendermint` directory in an @patch in a disabled test

Solution: Updated the @patch for completeness

* Problem: BigchainDB class should be part of project root

Solution: Removed the /tendermint directory and moved its contents to project root

* Problem: Flake8 complained that imports were not at the top of the file

Solution: Had to play around with the order of imports to avoid cyclic dependencies, but its working and style compliant now

* Problem: Stale reference to /tendermint directory in the index

Solution: Removed the references to /tendermint

* Problem: Flake8 complaining of unused import in __init__.py

Solution: The import is there so I can import App directly from bigchaindb, rather than from bigchaindb.core (which I think improves code readability. I added a # noqa to silence Flake8.

* Problem: Stale references to `bigchaindb.tendermint.BigchainDB` in the rst files cause Sphinx to fail

Solution: Updated the autodoc files to use `bigchaindb.BigchainDB` instead

* Problem: Stale reference to the `tendermint` directory in an @patch in a disabled test

Solution: Updated the @patch for completeness
2018-07-25 16:59:25 +02:00
Zachary Bowen
4d2e58416c Problem: Bigchain class is unused and redundant (#2366)
* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Fixed flake8 complaint about too many blank lines

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Updating from master changed BigchainDB.process_post_response to a private method, so I had to align with that.

* Fixed a couple stale references to bigchaindb.Bigchain in docstrings

* Missed a reference to `Bigchain` in a patch call...

* Merge with master and re-do some changes
2018-07-10 17:34:51 +02:00
Muawia Khan
1bad851e07
Problem: Tendermint configuration not present in BigchainDB config (#2342)
* Problem: Tendermint configuration not present in BigchainDB config

* Handle tendermint configurations properly

- Update docs

* Nitpick

* Missed some conflicts

* Make changes in tendermint/lib.py instead of deprecated core.py

- Also remove redundant info from docs about default values

* Fix docsserver automethod
2018-06-29 18:45:22 +05:00
Muawia Khan
2b39566a4b Problem: Some configurations are defunct (#2338)
* Problem: BigchainDB config has stale/deprecated parameters

- Remove `keyring` and `keypair` from config
- Update tests
- Add `tendermint` config

* Fix flake8

* Update some naming conventions and redundant changes

* Remove redundant routine `fast_query`

* Remove deprecated parameters and descriptions

* remove some more unwanted code

* Problem: Two flake8 errors made Travis fail

Solution: Fix the two flake8 errors

* Address comments

- Remove reference of nodes_except_me and me_private and me
  as attributes of BigchainDB instances
- Update and re-add test(s)
- Do not introduce `tendermint` in configuration instead handle that
  in a separate PR along with docs

* Address comments

- Remove tests that are already covered with 2.0
- Remove tests that are no longer relevant
- Add TODO for more cleanup

* Remove tendermint config from configure command
2018-06-08 15:50:50 +02:00
Ahmed Muawia Khan
82e3f21c9a Merge branch 'alpha-3' 2018-05-02 16:35:49 +02:00
Vanshdeep Singh
920d69b0c4 Problem: Upsert validator not migrated to Tendermint 0.19.0 (#2252)
* Problem: Upsert validator not migrated to Tendermint 0.19.0

Solution: Migrate the same to Tendermint 0.19.0

* Problem: There are no tests for public key encoding/decoding

Solution: Add necessary tests
2018-05-02 16:21:28 +02:00
vrde
8d589d0181
Problem: we don't have acceptance tests (#2216)
Solution: have a simple way to start a node and run scripts against it.
2018-04-30 14:43:39 +02:00
Vanshdeep Singh
127ee08053 Problem: No crash recovery mechanism (#2207)
Solution: Add crash recovery logic based on BEP#8
2018-04-18 10:46:16 +02:00
Vanshdeep Singh
e4e528e5c4 Problem: Changing validators requires a network restart (#2070)
Solution: Allow nodes to add, update, or remove validators at runtime using a new command. Implements BEP3.
2018-03-29 18:25:26 +02:00
Shahbaz Nazir
e8e02cac50 Problem: Bigchaindb startup sometimes fails due genesis block creation during init (#2129)
* removing GENESIS transaction type
* remove GENESIS transaction schema
* all blocks are same in the eyes of GOD no checks needed for genesis blocks
2018-03-16 16:19:12 +01:00
Ahmed Muawia Khan
f537d061d5 Problem: Migrate-CLI changes were reverted because of travis changes (#2121)
* Testing tendermint docker compose for travis

* Typo tendermint*

* Re-do migrate cli changes

* don't skip event stream test

* Fix flake8 and unskip a test skipped during dev

* Revert styling changes made from editor

* skip a failing test case which was already disabled

* Remove reference to 'keypair' in commands
2018-03-09 13:08:37 +01:00
Ahmed Muawia Khan
60f2ccaead Revert "Migrate cli for tendermint integration" 2018-03-05 15:49:55 +01:00
Ahmed Muawia Khan
5f06ad5493
Merge pull request #2092 from muawiakh/migrate-cli
Migrate cli for tendermint integration
2018-02-28 14:44:43 +01:00
Vanshdeep Singh
cdec60a7c0 Rollback crash recovery mechanism (#2091) 2018-02-23 14:35:18 +01:00
Ahmed Muawia Khan
5cea9c28bf Migrate CLI for tendermint integration
- Remove commands that were not required.
  - export-my-pubkey
  - set-shards
  - set-replicas
  - add-replicas
  - remove-replicas
- Update bigchaindb --help, usage description
- Re-enable tests
- Update docker-compose.travis.yml and Dockerfile for travis
  because some env variables are not needed
2018-02-22 21:48:42 +01:00
Vanshdeep Singh
5bfa8e29d8 Crash recovery mechanism (#2045)
* Crash recovery mechanism

* Propogate exception

* Added docs and crash receovery during block write

* Fix flake8 issue

* Remove approach 1 for crash recovery, recover db on 'bigchiandb start'

* Fix CI build issues

* Remove documentation
2018-02-21 10:50:12 +01:00
kansi
8aba802425 Fix tests 2017-11-07 15:41:55 +05:30
kansi
5954d6360a Added cmd flag --init to start command 2017-10-24 16:59:10 +05:30
vrde
3995e22d4a Fail if config file not found 2017-05-18 17:43:44 +02:00
Sylvain Bellemare
4d8f9dd777 Explicitly set default log config
Closes #1318
2017-04-18 16:21:02 +02:00
Sylvain Bellemare
303e12ee28 Test command run_init when db already exists 2017-04-12 16:38:18 +02:00
Sylvain Bellemare
a7ed28e539 Test command helper _run_init 2017-04-12 16:12:41 +02:00
Anuj
bb68a44b96 Renamed bigchain import to bigchaindb 2017-04-04 13:55:24 +05:30
Anuj
8aac5c7e64 Merge remote-tracking branch 'upstream/master' into bug/437/pretty-msg-drop-nonexistent-db 2017-04-04 13:49:56 +05:30
Lavina
e7b0b227f1 Rename bigchain.py command module to bigchaindb.py 2017-04-03 11:21:32 +02:00
Anuj
c3f89fd447 Taking DB name from config in test for non-existent db drop 2017-04-03 13:13:22 +05:30
Anuj
09866920af Pretty message when dropping a non-existent database 2017-04-02 17:53:39 +05:30
Sylvain Bellemare
0ae9d19a54 Separate log configuration from logging process
Closes #1317
2017-03-22 16:35:24 +01:00
Sylvain Bellemare
eff8e3adf3 Update logging related code and tests after rebase 2017-03-21 11:12:46 +01:00
Sylvain Bellemare
43f779a18b Add logging infrastructure 2017-03-20 13:54:14 +01:00
Troy McConaghy
962a88b1d9 removed 'bigchaindb load' command & tests 2017-03-11 13:59:23 +01:00
Sylvain Bellemare
75d0a917d7 Remove stderr check 2017-03-07 12:29:54 +01:00
Brett Sun
ffe0eb60b9 Move tests related to commands/tests.py to separate test file 2017-03-07 12:29:54 +01:00
Brett Sun
df9fd6dc23 Move arguments related only to start command to be under start 2017-03-07 12:29:54 +01:00
Brett Sun
fce6b6af52 Standardize output streams for outputs of commands 2017-03-07 12:29:54 +01:00
Sylvain Bellemare
2e398f606f Make some improvements to command line messages and error handling 2017-03-06 14:45:10 +01:00
Sylvain Bellemare
24eb18fb59 Add tests for errors on startup 2017-03-06 14:45:10 +01:00
Sylvain Bellemare
1002668082 Fix broken tests 2017-03-06 14:45:10 +01:00
vrde
702d74a584
Merge branch 'master' into implement-connection-run-for-mongodb 2017-02-02 19:37:14 +01:00
Rodolphe Marques
84626b6e32 Improved tests
Fixed typo
Add extra validation to hostnames to make sure host is not empty
2017-01-31 16:23:09 +01:00
Rodolphe Marques
9d03aeb72a fixed tests 2017-01-26 15:02:48 +01:00
Rodolphe Marques
391da2cf60 Added tests 2017-01-25 12:36:08 +01:00
Rodolphe Marques
f12264773c bigchaindb configure now requires a positional backend argument.
Created and fixed tests.
Updated `b` fixture
2017-01-23 16:49:59 +01:00
Brett Sun
438958fdea Rename builtin-in input override in commands (#988)
* Rename commands.bigchain.input to input_on_stderr to avoid confusion

* Allow input_on_stderr to not take a prompt

* Fix tests broken by renaming of commands.bigchaindb.input
2016-12-22 17:03:53 +01:00
Brett Sun
2882bee48e Small flake8 fixes for tests (#987) 2016-12-22 11:57:13 +01:00
Sylvain Bellemare
fa79fe6783 Add session scope test setup for config and db
resolves #966
2016-12-20 20:37:28 +01:00
Brett Sun
b4063dd9ad More test abstractions for multiple databases (#950)
* Remove unnecessary import of rethinkdb in a test

* Move test_run_query_util as a rethinkdb-specific test

* Move rethinkdb-specific command tests to own file

* Add __init__.py to new test folders

* Move command tests to their own test module

* Move fixtures out of command tests into separate conftest for commands

* Fix some small flake8 issues with rethinkdb's test_run_query_util

* Add pytest ignore hook to filter out test dirs that are not for the requested backend

* Move backend-specific tests in tests/db/ to tests/backend/
2016-12-16 22:17:13 +01:00