1
0
mirror of https://github.com/moby/moby.git synced 2025-08-01 05:47:11 +03:00

builder: updates to session after vendor

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2017-09-21 22:07:45 -07:00
parent ed6fd3d95b
commit d472974902
4 changed files with 55 additions and 7 deletions

View File

@ -586,7 +586,9 @@ func testBuildWithSession(c *check.C, dir, dockerfile string) (outStr string) {
sess, err := session.NewSession("foo1", "foo")
assert.Nil(c, err)
fsProvider := filesync.NewFSSyncProvider(dir, nil)
fsProvider := filesync.NewFSSyncProvider([]filesync.SyncedDir{
{Dir: dir},
})
sess.Allow(fsProvider)
g, ctx := errgroup.WithContext(context.Background())
@ -596,7 +598,7 @@ func testBuildWithSession(c *check.C, dir, dockerfile string) (outStr string) {
})
g.Go(func() error {
res, body, err := request.Post("/build?remote=client-session&session="+sess.UUID(), func(req *http.Request) error {
res, body, err := request.Post("/build?remote=client-session&session="+sess.ID(), func(req *http.Request) error {
req.Body = ioutil.NopCloser(strings.NewReader(dockerfile))
return nil
})