diff --git a/run_integration_tests.go b/run_integration_tests.go index bef9239f8..3782353ab 100644 --- a/run_integration_tests.go +++ b/run_integration_tests.go @@ -94,6 +94,7 @@ func (env *TravisEnvironment) Prepare() error { "golang.org/x/tools/cmd/cover", "github.com/pierrre/gotestcover", "github.com/NebulousLabs/glyphcheck", + "github.com/golang/dep/cmd/dep", "github.com/restic/rest-server/cmd/rest-server", } @@ -250,6 +251,10 @@ func (env *TravisEnvironment) RunTests() error { return err } + if err = runDep(); err != nil { + return err + } + if err = runGlyphcheck(); err != nil { return err } @@ -409,6 +414,19 @@ func runGofmt() error { return nil } +func runDep() error { + cmd := exec.Command("dep", "ensure", "-no-vendor", "-dry-run") + cmd.Stderr = os.Stderr + cmd.Stdout = os.Stdout + + err := cmd.Run() + if err != nil { + return fmt.Errorf("error running dep: %v\nThis probably means that Gopkg.lock is not up to date, run 'dep ensure' and commit all changes", err) + } + + return nil +} + func runGlyphcheck() error { cmd := exec.Command("glyphcheck", "./cmd/...", "./internal/...") cmd.Stderr = os.Stderr