Test fees (#698)

* feat: Add Docker container setup for Nutshell mint in test-nutshell recipe

* test: Add wait mechanism for Nutshell docker container startup

* test: Modify Nutshell wallet tests to run sequentially

* fix: mintd set input fee pkk

* feat: fee tests

* fix: melt returning fee in change

* fix: fee tests

* fix: fee tests
This commit is contained in:
thesimplekid
2025-04-03 00:30:50 +01:00
committed by GitHub
parent f0766d0ae4
commit 7fbe55ea02
12 changed files with 330 additions and 99 deletions

View File

@@ -33,6 +33,7 @@ cleanup() {
unset CDK_MINTD_LN_BACKEND CDK_MINTD_FAKE_WALLET_SUPPORTED_UNITS CDK_MINTD_MNEMONIC
unset CDK_MINTD_FAKE_WALLET_FEE_PERCENT CDK_MINTD_FAKE_WALLET_RESERVE_FEE_MIN CDK_MINTD_DATABASE
unset TEST_STATUS
unset CDK_MINTD_INPUT_FEE_PPK
echo "Cleanup complete."
}
@@ -55,6 +56,7 @@ export CDK_MINTD_MNEMONIC="eye survey guilt napkin crystal cup whisper salt lugg
export CDK_MINTD_FAKE_WALLET_FEE_PERCENT="0"
export CDK_MINTD_FAKE_WALLET_RESERVE_FEE_MIN="1"
export CDK_MINTD_DATABASE="redb"
export CDK_MINTD_INPUT_FEE_PPK="100"
echo "Starting fake mintd"
@@ -150,10 +152,12 @@ fi
# Export URLs as environment variables
export MINT_URL=${MINT_URL}
export WALLET_URL=${WALLET_URL}
export CDK_TEST_MINT_URL=${MINT_URL}
# Run the integration test
echo "Running integration test..."
cargo test -p cdk-integration-tests --tests nutshell_wallet
cargo test -p cdk-integration-tests --test nutshell_wallet
cargo test -p cdk-integration-tests --test test_fees
TEST_STATUS=$?
# Exit with the test status