TestCommand_Run_failInvalidPath verifies Run fails if the path is invalid
(t *testing.T)
| 617 | |
| 618 | // TestCommand_Run_failInvalidPath verifies Run fails if the path is invalid |
| 619 | func TestCommand_Run_failInvalidPath(t *testing.T) { |
| 620 | for i := range updateStrategies { |
| 621 | strategy := updateStrategies[i] |
| 622 | t.Run(string(strategy), func(t *testing.T) { |
| 623 | path := filepath.Join("fake", "path") |
| 624 | err := Command{ |
| 625 | Path: path, |
| 626 | FullPackagePath: toAbsPath(t, path), |
| 627 | Strategy: strategy, |
| 628 | }.Run() |
| 629 | if assert.Error(t, err) { |
| 630 | assert.Contains(t, err.Error(), "no such file or directory") |
| 631 | } |
| 632 | }) |
| 633 | } |
| 634 | } |
| 635 | |
| 636 | // TestCommand_Run_failInvalidRef verifies Run fails if the ref is invalid |
| 637 | func TestCommand_Run_failInvalidRef(t *testing.T) { |