Skip to content

test: add case for subcommand#2

Merged
bruhtus merged 19 commits intomasterfrom
test/add-case-for-subcommand
Aug 30, 2025
Merged

test: add case for subcommand#2
bruhtus merged 19 commits intomasterfrom
test/add-case-for-subcommand

Conversation

@bruhtus
Copy link
Owner

@bruhtus bruhtus commented Aug 27, 2025

Adding test case for existing subcommands.

bruhtus added 18 commits August 27, 2025 15:02
The format of `t.Errorf()` is something like `file.go:69: message`, so
if we use lower case for the message, we might miss the error message.

Let's try using capitalization at the beginning of the message and see
how it goes.
Make the filename scheme consistent using underscore instead of dash.
This is so that we can debug the generated json file in test by
replacing the temporary directory with `/tmp`.
This is so that i can use it separately from TestSetupStatusFile().
Sometimes i need to test the scenario where the status file is not
exist yet and need to reset the file state so that we can reuse the
file.
The cleanup function is called in "last added, first called" order, so
let's put it before looping cases to make sure that it's called last.
Test whether the end time result correct or not.
Test whether `is_notify` is true or false depending on input use notify
and notify command exist.
Feels like we don't need to create test for reset functionality as it's
basically only deleting the status file.
Test the status indicator when we have pause point in status file.
To make sure that the pipeline get triggered in new commit (?). Let's
see how it goes.
Let's see if this changes can fix the failed test.
Let's see if using `Compare()` actually solve the failing test on
github CI.
@bruhtus bruhtus marked this pull request as ready for review August 30, 2025 04:10
@bruhtus bruhtus merged commit fa57210 into master Aug 30, 2025
1 check passed
@bruhtus bruhtus deleted the test/add-case-for-subcommand branch August 30, 2025 04:16
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.

1 participant