@@ -188,7 +188,10 @@ var _ = Describe("Supply", func() {
188188 ffiDir := expectInstallFfi ()
189189 mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "pip" , "install" , "setuptools_scm" , "--exists-action=w" , "--no-index" , "--find-links=/tmp/pipenv" )
190190 mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "pip" , "install" , "pytest-runner" , "--exists-action=w" , "--no-index" , "--find-links=/tmp/pipenv" )
191+ mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "pip" , "install" , "parver" , "--exists-action=w" , "--no-index" , "--find-links=/tmp/pipenv" )
192+ mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "pip" , "install" , "invoke" , "--exists-action=w" , "--no-index" , "--find-links=/tmp/pipenv" )
191193 mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "pip" , "install" , "pipenv" , "--exists-action=w" , "--no-index" , "--find-links=/tmp/pipenv" )
194+ mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "pip" , "install" , "wheel" , "--exists-action=w" , "--no-index" , "--find-links=/tmp/pipenv" )
192195
193196 mockStager .EXPECT ().LinkDirectoryInDepDir (filepath .Join (filepath .Join (depDir , "python" ), "bin" ), "bin" )
194197 return ffiDir
@@ -216,7 +219,7 @@ var _ = Describe("Supply", func() {
216219
217220 It ("installs pipenv and generates requirements.txt" , func () {
218221 expectInstallPipEnv ()
219- mockCommand .EXPECT ().Output ( buildDir , "pipenv" , "lock" , "--requirements" ) .Return ("test" , nil )
222+ mockCommand .EXPECT ().RunWithOutput ( gomock . Any ()) .Return ([] byte ( "test" ) , nil )
220223 Expect (supplier .InstallPipEnv ()).To (Succeed ())
221224 requirementsContents , err := ioutil .ReadFile (filepath .Join (depDir , "requirements.txt" ))
222225 Expect (err ).ToNot (HaveOccurred ())
@@ -225,7 +228,7 @@ var _ = Describe("Supply", func() {
225228
226229 It ("removes extraneous pipenv lock output" , func () {
227230 expectInstallPipEnv ()
228- mockCommand .EXPECT ().Output ( buildDir , "pipenv" , "lock" , "--requirements" ) .Return ("Using /tmp/deps/0/bin/python3.6m to create virtualenv…\n line 1\n line 2\n " , nil )
231+ mockCommand .EXPECT ().RunWithOutput ( gomock . Any ()) .Return ([] byte ( "Using /tmp/deps/0/bin/python3.6m to create virtualenv…\n line 1\n line 2\n " ) , nil )
229232 Expect (supplier .InstallPipEnv ()).To (Succeed ())
230233 requirementsContents , err := ioutil .ReadFile (filepath .Join (depDir , "requirements.txt" ))
231234 Expect (err ).ToNot (HaveOccurred ())
@@ -358,7 +361,7 @@ var _ = Describe("Supply", func() {
358361 Expect (os .MkdirAll (depDir , 0755 )).To (Succeed ())
359362 Expect (ioutil .WriteFile (filepath .Join (buildDir , "Pipfile" ), []byte ("This is pipfile" ), 0644 )).To (Succeed ())
360363 ffiDir = expectInstallPipEnv ()
361- mockCommand .EXPECT ().Output ( buildDir , "pipenv" , "lock" , "--requirements" ) .Return ("test" , nil )
364+ mockCommand .EXPECT ().RunWithOutput ( gomock . Any ()) .Return ([] byte ( "test" ) , nil )
362365
363366 // install pipenv
364367 Expect (supplier .InstallPipEnv ()).To (Succeed ())
@@ -526,7 +529,7 @@ cffi==0.9.2
526529 BeforeEach (func () {
527530 Expect (ioutil .WriteFile (filepath .Join (depDir , "requirements.txt" ), []byte {}, 0644 )).To (Succeed ())
528531 })
529- const proTip = "You have a vendor directory, it must contain all of your dependencies ."
532+ const proTip = "Running pip install failed. You need to include all dependencies in the vendor directory ."
530533 Context ("vendor does not exist" , func () {
531534 BeforeEach (func () {
532535 mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "pip" , "install" , "-r" , filepath .Join (depDir , "requirements.txt" ), "--ignore-installed" , "--exists-action=w" , fmt .Sprintf ("--src=%s/src" , depDir )).Return (fmt .Errorf ("exit 28" ))
@@ -539,7 +542,7 @@ cffi==0.9.2
539542 Context ("vendor exists" , func () {
540543 BeforeEach (func () {
541544 Expect (os .Mkdir (filepath .Join (buildDir , "vendor" ), 0755 )).To (Succeed ())
542- mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "pip" , "install" , "-r" , filepath .Join (depDir , "requirements.txt" ), "--ignore-installed" , "--exists-action=w" , fmt .Sprintf ("--src=%s/src" , depDir ), "--no-index" , fmt .Sprintf ("--find-links=file://%s/vendor" , buildDir )).Return (fmt .Errorf ("exit 28" ))
545+ mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "pip" , "install" , "-r" , filepath .Join (depDir , "requirements.txt" ), "--ignore-installed" , "--exists-action=w" , fmt .Sprintf ("--src=%s/src" , depDir ), "--no-index" , fmt .Sprintf ("--find-links=file://%s/vendor" , buildDir )).Return (fmt .Errorf ("exit 28" )). Times ( 2 )
543546 })
544547 It ("alerts the user" , func () {
545548 Expect (supplier .RunPip ()).To (MatchError (fmt .Errorf ("Couldn't run pip: exit 28" )))
0 commit comments