(t *testing.T)
| 14 | ) |
| 15 | |
| 16 | func 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 | |
| 28 | func TestRestoreHelpClarifiesTargetPath(t *testing.T) { |
| 29 | if !strings.Contains(restoreCmd.Use, "<target-path> <revision>") { |