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(stdlibs/std): use real MsgRun pkgpath in TestPrevRealmIsOrigin #2239

Merged
merged 1 commit into from
May 29, 2024

Conversation

thehowl
Copy link
Member

@thehowl thehowl commented May 29, 2024

This PR fixes the current failing CI on master.

The test case was incorrect, as it was using a MsgRun frame which wasn't matching what a MsgRun frame would look like (and thus give a corresponding result, when calling PrevRealm):

gno/gnovm/pkg/gnolang/realm.go

Lines 1521 to 1529 in ac3a802

var ReGnoRunPath = regexp.MustCompile(`gno\.land/r/g[a-z0-9]+/run`)
// IsRealmPath determines whether the given pkgpath is for a realm, and as such
// should persist the global state.
func IsRealmPath(pkgPath string) bool {
return strings.HasPrefix(pkgPath, realmPathPrefix) &&
// MsgRun pkgPath aren't realms
!ReGnoRunPath.MatchString(pkgPath)
}

This PR makes the "test frame" respect the regex, making the test case correct again.

Verified

This commit was signed with the committer’s verified signature.
thehowl Morgan
@thehowl thehowl requested a review from tbruyelle May 29, 2024 12:10
@thehowl thehowl self-assigned this May 29, 2024
@thehowl thehowl requested a review from zivkovicmilos May 29, 2024 12:10
@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label May 29, 2024
@thehowl thehowl merged commit e8b26ec into master May 29, 2024
15 checks passed
@thehowl thehowl deleted the dev/morgan/240529-hotfix branch May 29, 2024 12:28
Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.95%. Comparing base (ac3a802) to head (43ec721).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2239      +/-   ##
==========================================
+ Coverage   49.93%   49.95%   +0.01%     
==========================================
  Files         576      577       +1     
  Lines       77761    77859      +98     
==========================================
+ Hits        38832    38891      +59     
- Misses      35802    35841      +39     
  Partials     3127     3127              
Flag Coverage Δ
gnovm 45.07% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

omarsy pushed a commit to TERITORI/gno that referenced this pull request Jun 3, 2024
…nolang#2239)

This PR fixes the current failing CI on master.

The test case was incorrect, as it was using a MsgRun frame which wasn't
matching what a MsgRun frame would look like (and thus give a
corresponding result, when calling PrevRealm):


https://github.com/gnolang/gno/blob/ac3a802e7dd8a2ac47a1c119f5614e76e96e643a/gnovm/pkg/gnolang/realm.go#L1521-L1529

This PR makes the "test frame" respect the regex, making the test case
correct again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants