()
| 156 | } |
| 157 | |
| 158 | func newTestStorageCommand() *cobra.Command { |
| 159 | cmd := &cobra.Command{ |
| 160 | Use: "test-storage", |
| 161 | Short: "test all operations of an external storage", |
| 162 | Long: "Test all ExternalStorage operations including read, write, delete, " + |
| 163 | "rename, walk, and streaming operations. This helps verify storage " + |
| 164 | "configuration and permissions before using it for backup/restore.", |
| 165 | Args: cobra.NoArgs, |
| 166 | RunE: func(cmd *cobra.Command, args []string) error { |
| 167 | cfg := operator.TestStorageConfig{} |
| 168 | if err := cfg.ParseFromFlags(cmd.Flags()); err != nil { |
| 169 | return err |
| 170 | } |
| 171 | ctx := GetDefaultContext() |
| 172 | return operator.RunTestStorage(ctx, cfg) |
| 173 | }, |
| 174 | } |
| 175 | operator.DefineFlagsForTestStorageConfig(cmd.Flags()) |
| 176 | return cmd |
| 177 | } |
no test coverage detected