grafana_bak/pkg/cmd/grafana/main_test.go
2025-04-01 10:38:02 +09:00

17 lines
322 B
Go

package main
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestMainApp_NoDuplicateSubcommands(t *testing.T) {
app := MainApp()
found := map[string]bool{}
for _, cmd := range app.Commands {
require.False(t, found[cmd.Name], "command %q registered twice", cmd.Name)
found[cmd.Name] = true
}
}