Add go profiling flag, and enable on integration tests (#1382)

This commit is contained in:
Kristoffer Dalby 2023-04-27 16:57:11 +02:00 committed by GitHub
parent d0113732fe
commit 56dd734300
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 333 additions and 13 deletions

View file

@ -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
}