summaryrefslogtreecommitdiff
path: root/cmd/gotosocial/testrig.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/gotosocial/testrig.go')
-rw-r--r--cmd/gotosocial/testrig.go29
1 files changed, 16 insertions, 13 deletions
diff --git a/cmd/gotosocial/testrig.go b/cmd/gotosocial/testrig.go
index 20cca9f1c..124fc1105 100644
--- a/cmd/gotosocial/testrig.go
+++ b/cmd/gotosocial/testrig.go
@@ -23,19 +23,22 @@ import (
)
func testrigCommands() *cobra.Command {
- testrigCmd := &cobra.Command{
- Use: "testrig",
- Short: "gotosocial testrig-related tasks",
- }
+ if testrig.Start != nil {
+ testrigCmd := &cobra.Command{
+ Use: "testrig",
+ Short: "gotosocial testrig-related tasks",
+ }
- testrigStartCmd := &cobra.Command{
- Use: "start",
- Short: "start the gotosocial testrig server",
- RunE: func(cmd *cobra.Command, args []string) error {
- return run(cmd.Context(), testrig.Start)
- },
- }
+ testrigStartCmd := &cobra.Command{
+ Use: "start",
+ Short: "start the gotosocial testrig server",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ return run(cmd.Context(), testrig.Start)
+ },
+ }
- testrigCmd.AddCommand(testrigStartCmd)
- return testrigCmd
+ testrigCmd.AddCommand(testrigStartCmd)
+ return testrigCmd
+ }
+ return nil
}