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

e2e tests for log #2950

Merged
merged 5 commits into from
Sep 25, 2021
Merged

e2e tests for log #2950

merged 5 commits into from
Sep 25, 2021

Conversation

shiqizng
Copy link
Contributor

Summary

This PR moves the log e2e tests to scripts/e2e_subs. This dir is used by the indexer to build blocks and queries.

Copy link
Contributor

@algorandskiy algorandskiy left a comment

Choose a reason for hiding this comment

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

Thank you Shiqi! I was about to start the same work later today.
Looks good, few code style remarks.

curl -q -s -H "Authorization: Bearer $PUB_TOKEN" "$NET$1"
}

function app-txid {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
function app-txid {
function app_txid {

people usually tend not to use hyphens in var/func names

# app create
TXID=$(${gcmd} app create --creator "${ACCOUNT}" --approval-prog=${TEAL}/logs.teal --global-byteslices 4 --global-ints 0 --local-byteslices 0 --local-ints 1 --clear-prog=${TEAL}/approve-all.teal | app-txid)
# log len
[ "$(rest "/v2/transactions/pending/$TXID" | jq '.logs | length')" = 32 ]
Copy link
Contributor

Choose a reason for hiding this comment

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

save result of rest "/v2/transactions/pending/$TXID" into a var and reuse it later in the loop and after.

@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2021

Codecov Report

Merging #2950 (76c968a) into master (e69b10d) will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2950      +/-   ##
==========================================
- Coverage   47.33%   47.30%   -0.03%     
==========================================
  Files         355      355              
  Lines       57224    57224              
==========================================
- Hits        27085    27069      -16     
- Misses      27079    27093      +14     
- Partials     3060     3062       +2     
Impacted Files Coverage Δ
ledger/blockqueue.go 81.03% <0.00%> (-4.03%) ⬇️
catchup/service.go 68.57% <0.00%> (-1.56%) ⬇️
network/wsPeer.go 74.93% <0.00%> (-0.28%) ⬇️
ledger/acctupdates.go 62.92% <0.00%> (-0.18%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e69b10d...76c968a. Read the comment docs.

algorandskiy
algorandskiy previously approved these changes Sep 24, 2021
@jannotti jannotti merged commit 2faace9 into algorand:master Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants