Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature(cli): Add smoke tests for cli commands #1617

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

sambukowski
Copy link
Contributor

@sambukowski sambukowski commented Oct 3, 2024

Add smoke tests for all existing sequencer commands for the cli.
Tests added:

  • account create
  • address bech32m
  • account balance
  • balance get
  • account nonce
  • blockheight get
  • sudo ibc-relayer add
  • sudo ibc-relayer remove
  • sudo fee-asset add
  • sudo fee-asset remove
  • sudo sudo-address-change
  • sudo validator-update
  • transfer

┆Issue Number: ENG-868

closes #1570

@github-actions github-actions bot added the cd label Oct 3, 2024
@sambukowski sambukowski changed the title Feature(cli): Add smoke tests for cli Feature(cli): Add smoke tests for cli commands Oct 3, 2024
@sambukowski sambukowski marked this pull request as ready for review October 4, 2024 16:40
@sambukowski sambukowski requested a review from a team as a code owner October 4, 2024 16:40
set -e

# make a new account to get the address bytes
output=$(just cli-test command {{ tag }} sequencer account create)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe should be a default address in bytes configured instead of creating an account? create account might change to print a bech32m prefixed address instead of bytes

Copy link
Contributor

@quasystaty1 quasystaty1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smoke tests LGTM.

command tag *ARGS:
docker run --rm --network host "ghcr.io/astriaorg/astria-cli{{ if tag != '' { replace(':#', '#', tag) } else { '' } }}" {{ ARGS }}

fundedAccount := "astria1rsxyjrcm255ds9euthjx6yc3vrjt9sxrm9cfgm"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: sudoAccount, but can be treated as a fundedAccount

Copy link
Member

@SuperFluffy SuperFluffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't write the smoke tests this way. They just verify if the form of the output is of a certain shape, but not if the commands were actually executed (which is the whole point behind smoke tests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test every CLI command
4 participants