test: move accounting_tests and rpc_wallet_tests to wallet/test #7905

pull laanwj wants to merge 4 commits into bitcoin:master from laanwj:2016_04_accounting_tests_to_wallet changing 14 files +66 −59
  1. laanwj commented at 12:10 PM on April 18, 2016: member

    Move the two other wallet tests to where they belong. @jonasschnelli I'm surprised you didn't stumble on this one yet

  2. test: move accounting_tests and rpc_wallet_tests to wallet/test
    Move the two other wallet tests to where they belong.
    de39c95c24
  3. laanwj added the label Build system on Apr 18, 2016
  4. laanwj added the label Tests on Apr 18, 2016
  5. jonasschnelli commented at 12:20 PM on April 18, 2016: contributor

    Yes! This should have been done long ago. Thanks for fixing. utACK de39c95c2468cc643a5d5bed9e5dd8cea6a40747

  6. laanwj commented at 12:31 PM on April 18, 2016: member

    With this, I guess we also want a wallet-specific test fixture, to get rid of the ENABLE_WALLETs in test_bitcoin.cpp?

  7. test: Create test fixture for wallet
    Removes all the `#ifdef ENABLE_WALLET` from `test_bitcoin` by
    making the wallet tests use their own fixture.
    f4eae2d910
  8. laanwj force-pushed on Apr 18, 2016
  9. laanwj commented at 12:58 PM on April 18, 2016: member

    Done. Latest commit removes all wallet-related setup from test_bitcoin.cpp. Wallet tests set up and tear down their own environment.

    These references to the wallet remain in src/test, this probably signifies some code movement is still necessary:

    multisig_tests.cpp:#include "wallet/wallet_ismine.h"
    script_P2SH_tests.cpp:#include "wallet/wallet_ismine.h"
    
  10. sipa commented at 12:59 PM on April 18, 2016: member

    I believe the wallet_ismine code should be moved to script/sign or script/standard.

  11. in src/wallet/test/wallet_test_fixture.cpp:None in f4eae2d910 outdated
       8 | +    TestingSetup(chainName)
       9 | +{
      10 | +    bitdb.MakeMock();
      11 | +
      12 | +    bool fFirstRun;
      13 | +    pwalletMain = new CWallet("wallet.dat");
    


    MarcoFalke commented at 1:02 PM on April 18, 2016:

    Could make sense to use "wallet_test.dat" here, to indicate that the file name is not hardcoded?


    laanwj commented at 1:05 PM on April 18, 2016:

    Sounds good to me in principle (although I just moved this code here, I didn't touch it)

    Edit: done in a separate commit

  12. laanwj commented at 1:05 PM on April 18, 2016: member

    @sipa What about keeping it separate and just moving, e.g. script/ismine.cpp and script/ismine.h?

  13. wallet_ismine.h → script/ismine.h
    Removes conditional dependency of `src/test` on wallet.
    
    Makes multisig and P2SH tests complete without wallet built-in.
    a25a4f5b04
  14. test: Rename wallet.dat to wallet_test.dat
    Indicate that the file name is not hardcoded, and a little bit of safety
    so that it never nukes the main wallet.
    
    Suggestion by Marco Falke.
    b30fb42e49
  15. laanwj force-pushed on Apr 18, 2016
  16. laanwj commented at 1:17 PM on April 18, 2016: member

    moving, e.g. script/ismine.cpp and script/ismine.h?

    Done. All conditional wallet stuff is gone now from src/test.

  17. MarcoFalke commented at 7:25 PM on April 18, 2016: member

    Confirmed move only besides b30fb42

    utACK b30fb42

  18. laanwj merged this on Apr 19, 2016
  19. laanwj closed this on Apr 19, 2016

  20. laanwj referenced this in commit 187186b0fe on Apr 19, 2016
  21. codablock referenced this in commit 2cb7b0a754 on Sep 16, 2017
  22. codablock referenced this in commit 9277a7b053 on Sep 19, 2017
  23. codablock referenced this in commit 8678f2b391 on Dec 20, 2017
  24. zkbot referenced this in commit fa341bcff0 on Dec 18, 2019
  25. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me