MCPcopy Create free account
hub / github.com/dropbox/dbxcli / TestRestoreArgValidation

Function TestRestoreArgValidation

cmd/restore_test.go:16–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14)
15
16func TestRestoreArgValidation(t *testing.T) {
17 err := restore(restoreCmd, []string{})
18 if err == nil {
19 t.Fatal("expected error for missing args")
20 }
21 for _, want := range []string{"target-path", "revision"} {
22 if !strings.Contains(err.Error(), want) {
23 t.Fatalf("error = %q, want mention of %q", err.Error(), want)
24 }
25 }
26}
27
28func TestRestoreHelpClarifiesTargetPath(t *testing.T) {
29 if !strings.Contains(restoreCmd.Use, "<target-path> <revision>") {

Callers

nothing calls this directly

Calls 2

restoreFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected