Skip to content

Commit

Permalink
[ADP-3476] Add conway param to CLI calls in ruby e2e spec (#4845)
Browse files Browse the repository at this point in the history
Hotfix for the wallet release on node 10.1.2

- Add conway parameters to cardano cli transaction calls in ruby tests

ADP-3476
  • Loading branch information
paolino authored Nov 18, 2024
2 parents a240d16 + 7f7d6ae commit 18bd208
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion scripts/buildkite/main/macos-silicon-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export TESTS_LOGDIR
CARDANO_NODE_CONFIGS="$(pwd)/configs/cardano"
export CARDANO_NODE_CONFIGS

VERSION=$(buildkite-agent meta-data get "release-version" --default "v2024-07-27")
CURRENT_VERSION=v2024-09-29

VERSION=$(buildkite-agent meta-data get "release-version" --default $CURRENT_VERSION)
echo "VERSION=$VERSION"

buildkite-agent artifact \
Expand Down
2 changes: 2 additions & 0 deletions scripts/buildkite/release/release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ git commit -am "Update cardano-wallet version in README.md"

sed -i "s|$OLD_GIT_TAG|$NEW_GIT_TAG|g" scripts/buildkite/main/linux-e2e.sh
git commit -am "Update cardano-wallet version in linux-e2e.sh"
sed -i "s|$OLD_GIT_TAG|$NEW_GIT_TAG|g" scripts/buildkite/main/macos-silicon-e2e.sh
git commit -am "Update cardano-wallet version in macos-silicon-e2e.sh"

RELEASE_COMMIT=$(git rev-parse HEAD)

Expand Down
14 changes: 6 additions & 8 deletions test/e2e/helpers/cardano_cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def tx_build_raw_always_fails(script_file,
target_addr,
collateral_ret_addr)
txbody = File.join(@node_state, 'txbody')
cli('transaction', 'build-raw',
cli('conway', 'transaction', 'build-raw',
'--tx-in', script_utxo,
'--tx-out', "#{target_addr}+#{50_000_000 - fee}",
'--tx-in-script-file', script_file,
Expand All @@ -106,15 +106,13 @@ def tx_build_raw_always_fails(script_file,
'--tx-out-return-collateral', "#{collateral_ret_addr}+#{collateral_utxo_amt - (fee * 1.5).to_i}",
'--tx-total-collateral', (fee * 1.5).to_i,
'--script-invalid',
'--babbage-era',
'--out-file', txbody)
txbody
end

def tx_build(*options)
txbody = File.join(@node_state, 'txbody')
cli('transaction', 'build',
'--babbage-era',
cli('conway', 'transaction', 'build',
'--testnet-magic', @protocol_magic,
'--out-file', txbody,
*options)
Expand All @@ -124,7 +122,7 @@ def tx_build(*options)
def tx_sign(txbody, keys)
txsigned = File.join(@node_state, 'txsigned')
signing_keys = keys.filter { |k, _| k.to_s.end_with?('_skey') }.map { |_, v| "--signing-key-file #{v}" }
cli('transaction', 'sign',
cli('conway', 'transaction', 'sign',
'--tx-body-file', txbody,
'--testnet-magic', @protocol_magic,
signing_keys.join(' '), # --signing-key-file key1 --signing-key-file key2 ...
Expand All @@ -135,17 +133,17 @@ def tx_sign(txbody, keys)
# @return [String] - tx id
def tx_submit(txsigned)
# submit
cli('transaction', 'submit',
cli('conway', 'transaction', 'submit',
'--tx-file', txsigned,
'--testnet-magic', @protocol_magic)

# return tx id
cli('transaction', 'txid',
cli('conway', 'transaction', 'txid',
'--tx-file', txsigned).strip
end

def policy_id(script_file)
cli('transaction', 'policyid',
cli('conway', 'transaction', 'policyid',
'--script-file', script_file).strip
end
end

0 comments on commit 18bd208

Please sign in to comment.