Add go profiling flag, and enable on integration tests (#1382)
This commit is contained in:
parent
d0113732fe
commit
56dd734300
44 changed files with 333 additions and 13 deletions
|
@ -72,3 +72,24 @@ func WriteFileToContainer(
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
func FetchPathFromContainer(
|
||||
pool *dockertest.Pool,
|
||||
container *dockertest.Resource,
|
||||
path string,
|
||||
) ([]byte, error) {
|
||||
buf := bytes.NewBuffer([]byte{})
|
||||
|
||||
err := pool.Client.DownloadFromContainer(
|
||||
container.Container.ID,
|
||||
docker.DownloadFromContainerOptions{
|
||||
OutputStream: buf,
|
||||
Path: path,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue