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

Test Coverage ram_actions Return Values #45

Merged
merged 6 commits into from
Feb 2, 2024

Conversation

ericpassmore
Copy link
Contributor

@ericpassmore ericpassmore commented Feb 2, 2024

Test coverage for ram action return values

Change Description

Added test method convert_json_to_hex , takes a json and converts it to hex. This is used to generate expected return codes from methods.
Added 6 methods that execute ram_actions and take additional arguments with the expected return codes, and ensure expected and actual return codes match.

  • validate_buyram_return
  • validate_ramtransfer_return
  • validate_ramburn_return
  • validate_buyrambytes_return
  • validate_sellram_return
  • validate_buyramself_return

Resolves #44

Created method to compute hex from provided JSON, this can be used as the expected return code
Created method to extract trace->act and return data
Commits fail as return data does not survive outside for-loop and is empty when compared to expected value
@ericpassmore ericpassmore changed the title Ehp/test ram actions Test Coverage ram_actions Return Values Feb 2, 2024
@DenisCarriere
Copy link
Member

LGTM 👍

@ericpassmore ericpassmore merged commit b0d8c38 into ram_actions Feb 2, 2024
1 check passed
@ericpassmore ericpassmore deleted the ehp/test_ram_actions branch February 2, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants