mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 19:32:26 -05:00
[chore/testing] Add env vars to skip testrig setup/teardown (#4317)
Add flags to skip local testrig db setup and teardown, to allow somewhat easier testing of migrations. Documents env vars available to the testrig. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4317 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
This commit is contained in:
parent
dcfc9b7885
commit
352353ce7a
8 changed files with 126 additions and 6 deletions
|
|
@ -84,3 +84,14 @@ func AddAdminMediaPrune(cmd *cobra.Command) {
|
|||
usage := fieldtag("AdminMediaPruneDryRun", "usage")
|
||||
cmd.Flags().Bool(name, true, usage)
|
||||
}
|
||||
|
||||
// AddTestrig attaches flags pertaining to testrig commands.
|
||||
func AddTestrig(cmd *cobra.Command) {
|
||||
skipDBSetup := TestrigSkipDBSetupFlag
|
||||
skipDBSetupUsage := fieldtag("TestrigSkipDBSetup", "usage")
|
||||
cmd.Flags().Bool(skipDBSetup, false, skipDBSetupUsage)
|
||||
|
||||
skipDBTeardown := TestrigSkipDBTeardownFlag
|
||||
skipDBTeardownUsage := fieldtag("TestrigSkipDBTeardown", "usage")
|
||||
cmd.Flags().Bool(skipDBTeardown, false, skipDBTeardownUsage)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue