Merge pull request #954 from mikebrow/go-version-update

adds golang 1.11.x to build
This commit is contained in:
Lantao Liu 2018-11-13 11:36:42 -08:00 committed by GitHub
commit ce51a102d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 40 deletions

View File

@ -2,6 +2,13 @@ git:
depth: 150
language: go
go:
- 1.11.x
- tip
matrix:
allow_failures:
- go: tip
sudo: required
@ -26,16 +33,10 @@ install:
before_script:
- export PATH=$HOME/gopath/bin:$PATH
jobs:
include:
- stage: Build
script:
- make install.tools
- make .gitvalidation
- make binaries
go: "1.10.x"
- stage: Test
script:
- make install.deps
- make containerd
- sudo PATH=$PATH GOPATH=$GOPATH make install-containerd
@ -46,4 +47,3 @@ jobs:
# Abuse travis to preserve the log.
- cat /tmp/test-integration/containerd.log
- cat /tmp/test-cri/containerd.log
go: "1.10.x"

View File

@ -51,7 +51,7 @@ func TestUpdateContainerResources(t *testing.T) {
"container",
pauseImage,
WithResources(&runtime.LinuxContainerResources{
MemoryLimitInBytes: 2 * 1024 * 1024,
MemoryLimitInBytes: 200 * 1024 * 1024,
}),
)
cn, err := runtimeService.CreateContainer(sb, cnConfig, sbConfig)
@ -62,18 +62,18 @@ func TestUpdateContainerResources(t *testing.T) {
require.NoError(t, err)
spec, err := container.Spec(context.Background())
require.NoError(t, err)
checkMemoryLimit(t, spec, 2*1024*1024)
checkMemoryLimit(t, spec, 200*1024*1024)
t.Log("Update container memory limit after created")
err = runtimeService.UpdateContainerResources(cn, &runtime.LinuxContainerResources{
MemoryLimitInBytes: 4 * 1024 * 1024,
MemoryLimitInBytes: 400 * 1024 * 1024,
})
require.NoError(t, err)
t.Log("Check memory limit in container OCI spec")
spec, err = container.Spec(context.Background())
require.NoError(t, err)
checkMemoryLimit(t, spec, 4*1024*1024)
checkMemoryLimit(t, spec, 400*1024*1024)
t.Log("Start the container")
require.NoError(t, runtimeService.StartContainer(cn))
@ -85,21 +85,21 @@ func TestUpdateContainerResources(t *testing.T) {
require.NoError(t, err)
stat, err := cgroup.Stat(cgroups.IgnoreNotExist)
require.NoError(t, err)
assert.Equal(t, uint64(4*1024*1024), stat.Memory.Usage.Limit)
assert.Equal(t, uint64(400*1024*1024), stat.Memory.Usage.Limit)
t.Log("Update container memory limit after started")
err = runtimeService.UpdateContainerResources(cn, &runtime.LinuxContainerResources{
MemoryLimitInBytes: 8 * 1024 * 1024,
MemoryLimitInBytes: 800 * 1024 * 1024,
})
require.NoError(t, err)
t.Log("Check memory limit in container OCI spec")
spec, err = container.Spec(context.Background())
require.NoError(t, err)
checkMemoryLimit(t, spec, 8*1024*1024)
checkMemoryLimit(t, spec, 800*1024*1024)
t.Log("Check memory limit in cgroup")
stat, err = cgroup.Stat(cgroups.IgnoreNotExist)
require.NoError(t, err)
assert.Equal(t, uint64(8*1024*1024), stat.Memory.Usage.Limit)
assert.Equal(t, uint64(800*1024*1024), stat.Memory.Usage.Limit)
}