Skip to content

Commit

Permalink
Fix failing cli tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbo4350 committed Jul 1, 2020
1 parent 4f71a09 commit 46e32c8
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 23 deletions.
Expand Up @@ -18,6 +18,6 @@ ${CARDANO_CLI} shelley stake-address deregistration-certificate \
fail_on_error $?

assert_file_exists "${TEST_DIR}/deregistration.cert"
assert_string 'DelegationCertificateShelley' "${TEST_DIR}/deregistration.cert"
assert_string 'Stake Address Deregistration Certificate' "${TEST_DIR}/deregistration.cert"

report_result ${error}
Expand Up @@ -18,6 +18,6 @@ ${CARDANO_CLI} shelley stake-address registration-certificate \
fail_on_error $?

assert_file_exists "${TEST_DIR}/registration.cert"
assert_string 'DelegationCertificateShelley' "${TEST_DIR}/registration.cert"
assert_string 'Stake Address Registration Certificate' "${TEST_DIR}/registration.cert"

report_result ${error}
@@ -0,0 +1,6 @@
type: TxUnsignedShelley
title:
cbor-hex:
a4008182582091999ea21177b33ebe6b8690724a0c026d410a11ad7521caa350abdafa5394c30001
8182581d615dbe1e2117641f8d618034b801a870ca731ce758c3bedd5c7e4429c11a05f5e100021a
000f4240031a0007a120

This file was deleted.

7 changes: 4 additions & 3 deletions cardano-cli/test/cli/transaction-calculate-min-fee/run
Expand Up @@ -15,10 +15,11 @@ error=0
${CARDANO_CLI} shelley transaction calculate-min-fee \
--tx-in-count 32 \
--tx-out-count 27 \
--ttl 10 \
--byron-witness-count 5 \
--witness-count 10 \
--testnet-magic 4036000900 \
--protocol-params-file "${DATA_DIR}/protocol-params.json" \
--signing-key-file "${DATA_DIR}/utxo.skey" \
--tx-body-file "${DATA_DIR}/tx-body-file" \
> "${TEST_DIR}/min-fee.txt"
fail_on_error $?

Expand All @@ -31,6 +32,6 @@ if test "${line_count}" -ne 1 ; then
error=1
fi

assert_string '1573502' "${TEST_DIR}/min-fee.txt"
assert_string '2594002' "${TEST_DIR}/min-fee.txt"

report_result ${error}
6 changes: 6 additions & 0 deletions cardano-cli/test/cli/transaction-sign/data/tx-body-file
@@ -0,0 +1,6 @@
type: TxUnsignedShelley
title:
cbor-hex:
a4008182582091999ea21177b33ebe6b8690724a0c026d410a11ad7521caa350abdafa5394c30001
8182581d615dbe1e2117641f8d618034b801a870ca731ce758c3bedd5c7e4429c11a05f5e100021a
000f4240031a0007a120
11 changes: 0 additions & 11 deletions cardano-cli/test/cli/transaction-sign/data/unsigned.tx

This file was deleted.

7 changes: 4 additions & 3 deletions cardano-cli/test/cli/transaction-sign/run
Expand Up @@ -15,7 +15,7 @@ error=0
# Defaults to signing a Mainnet transaction.
${CARDANO_CLI} shelley transaction sign \
--mainnet \
--tx-body-file "${DATA_DIR}/unsigned.tx" \
--tx-body-file "${DATA_DIR}/tx-body-file" \
--signing-key-file "${DATA_DIR}/initial-utxo1.skey" \
--tx-file "${TEST_DIR}/signed.tx"
fail_on_error $?
Expand All @@ -26,7 +26,7 @@ assert_string 'TxSignedShelley' "${TEST_DIR}/signed.tx"
# Sign for a testnet with a testnet network magic of 11, but use two signing keys.
${CARDANO_CLI} shelley transaction sign \
--testnet-magic 11 \
--tx-body-file "${DATA_DIR}/unsigned.tx" \
--tx-body-file "${DATA_DIR}/tx-body-file" \
--signing-key-file "${DATA_DIR}/initial-utxo1.skey" \
--signing-key-file "${DATA_DIR}/initial-utxo2.skey" \
--tx-file "${TEST_DIR}/signed.tx"
Expand All @@ -36,9 +36,10 @@ assert_file_exists "${TEST_DIR}/signed.tx"
assert_string 'TxSignedShelley' "${TEST_DIR}/signed.tx"

# Sign a pool registration transaction.
#TODO: This needs to use an unsigned tx with a registration certificate
${CARDANO_CLI} shelley transaction sign \
--mainnet \
--tx-body-file "${DATA_DIR}/pool-reg.cert" \
--tx-body-file "${DATA_DIR}/tx-body-file" \
--signing-key-file "${DATA_DIR}/utxo.skey" \
--signing-key-file "${DATA_DIR}/stake.skey" \
--signing-key-file "${DATA_DIR}/node-cold.skey" \
Expand Down

0 comments on commit 46e32c8

Please sign in to comment.