Fix test: initialize dockerHook with embedded provider

This commit is contained in:
WANG Ziqin 2019-07-31 17:29:28 +08:00
parent 06fce98c00
commit 4854d9b981
2 changed files with 5 additions and 3 deletions

View File

@ -109,7 +109,7 @@ func TestHTTPServer(t *testing.T) {
So(res[_errorKey], ShouldEqual, "invalid workerID "+invalidWorker)
})
Convey("flush disabled jobs", func(ctx C) {
Convey("flush disabled jobs", func(ctx C) {
req, err := http.NewRequest("DELETE", baseURL+"/jobs/disabled", nil)
So(err, ShouldBeNil)
clt := &http.Client{}

View File

@ -55,8 +55,10 @@ sleep 10
So(err, ShouldBeNil)
d := &dockerHook{
provider: provider,
image: "alpine",
emptyHook: emptyHook{
provider: provider,
},
image: "alpine",
volumes: []string{
fmt.Sprintf("%s:%s", cmdScript, "/bin/cmd.sh"),
},