mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
CLI: Improve "photoprism dl" to download multiple URLs with auth #5219
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
28
internal/commands/download_help_test.go
Normal file
28
internal/commands/download_help_test.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDownloadCommand_HelpFlagsAndArgs(t *testing.T) {
|
||||
if DownloadCommand.ArgsUsage != "[url]..." {
|
||||
t.Fatalf("ArgsUsage mismatch: %q", DownloadCommand.ArgsUsage)
|
||||
}
|
||||
// Verify new flags are present by name
|
||||
want := map[string]bool{
|
||||
"cookies": false,
|
||||
"add-header": false,
|
||||
"dl-method": false,
|
||||
}
|
||||
for _, f := range DownloadCommand.Flags {
|
||||
name := f.Names()[0]
|
||||
if _, ok := want[name]; ok {
|
||||
want[name] = true
|
||||
}
|
||||
}
|
||||
for k, ok := range want {
|
||||
if !ok {
|
||||
t.Fatalf("missing flag: %s", k)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user