-
Notifications
You must be signed in to change notification settings - Fork 389
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
[r/boards] [meta] tests #3623
Comments
@jeronimoalbi @x1unix you can add your name beside the functions in issue description. |
This was referenced Jan 28, 2025
jeronimoalbi
added a commit
that referenced
this issue
Jan 28, 2025
Add a missing filetests for `CreateBoard()` function. Related to #3623 This covers all tests for the function: - Creation success - Fail w/ empty board name - Fail w/ existing board name - Fail w/ non user call - Fail w/ an address as board name - Fail because name is registered and not owned in `users` realm - Fail w/ short name - Creation success with owned name registered in `users` realm - Fail for non realm DAO member
jeronimoalbi
added a commit
that referenced
this issue
Jan 28, 2025
Add a missing filetests for `RenameBoard()` function. Related to #3623. This covers all tests for the function: - Rename success by default board owner - Fail w/ empty board name - Fail w/ existing board name - Fail when renaming unexisting board - Fail w/ an address as board name - Rename success by another board owner - Fail because name is registered and not owned in `users` realm - Fail w/ short name - Rename success with owned name registered in `users` realm - Fail for non board DAO member
This was referenced Jan 29, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context:
This META issue tracks filetest coverage for all publicly callable methods in the boards realm.
Each checkbox corresponds to creating filetests (or updating existing ones) that thoroughly cover that function’s logic and edge cases.
render.gno
:Render(path string) string
?page=...
; test out-of-bounds pages.public.gno
:GetBoardIDFromName(name string) (BoardID, bool)
CreateBoard(name string) BoardID
@jeronimoalbiboard:create
. Unauthorized → panic.RenameBoard(name, newName string)
@jeronimoalbinewName
used, panic “board already exists.”<6 chars
or address-like → panic.FlagThread(bid BoardID, postID PostID, reason string)
thread:flag
.thread:flag
.CreateThread(bid BoardID, title, body string) PostID
thread:create
.render
pagination.CreateReply(bid BoardID, threadID, replyID PostID, body string) PostID
thread:create
or any member.replyID != threadID
, replying to another reply.FlagReply(bid BoardID, threadID, replyID PostID, reason string)
reply:flag
.CreateRepost(bid BoardID, threadID PostID, title, body string, dstBoardID BoardID) PostID
thread:repost
.DeleteThread(bid BoardID, threadID PostID)
thread:delete
.DeleteReply(bid BoardID, threadID, replyID PostID)
reply:delete
.EditThread(bid BoardID, threadID PostID, title, body string)
thread:edit
or thread owner.EditReply(bid BoardID, threadID, replyID PostID, title, body string)
InviteMember(bid BoardID, user std.Address, role Role)
@jeronimoalbimember:invite
; unauthorized → panic.RemoveMember(bid BoardID, user std.Address)
@jeronimoalbimember:remove
.HasMemberRole(bid BoardID, member std.Address, role Role) bool
@jeronimoalbiChangeMemberRole(bid BoardID, member std.Address, role Role)
@jeronimoalbirole:change
.Cross-Cutting Scenarios (Concurrency, Fuzzing, Load):
Some scenarios apply globally across multiple functions:
We can incorporate these into existing filetests (for example, a filetest that tries to create 1,000 threads or random board names), or separate them out if that’s simpler.
Notes:
The text was updated successfully, but these errors were encountered: