From bc97f51477d6fcd0baa84ced260b32a648044375 Mon Sep 17 00:00:00 2001 From: Mike Brown Date: Tue, 23 Oct 2018 16:53:50 -0500 Subject: [PATCH 1/2] adds golang 1.11.x and tip to build Signed-off-by: Mike Brown --- .travis.yml | 64 ++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index cbf491824..21fa81ac0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,48 +2,48 @@ git: depth: 150 language: go +go: + - 1.11.x + - tip + +matrix: + allow_failures: + - go: tip sudo: required services: - - docker + - docker cache: - directories: - - "${HOME}/google-cloud-sdk/" + directories: + - "${HOME}/google-cloud-sdk/" before_install: - # libseccomp in trusty is not new enough, need backports version. - - sudo sh -c "echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' > /etc/apt/sources.list.d/backports.list" - - sudo apt-get update + # libseccomp in trusty is not new enough, need backports version. + - sudo sh -c "echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' > /etc/apt/sources.list.d/backports.list" + - sudo apt-get update install: - - sudo apt-get install btrfs-tools - - sudo apt-get install libseccomp2/trusty-backports - - sudo apt-get install libseccomp-dev/trusty-backports - - sudo apt-get install socat + - sudo apt-get install btrfs-tools + - sudo apt-get install libseccomp2/trusty-backports + - sudo apt-get install libseccomp-dev/trusty-backports + - sudo apt-get install socat before_script: - - export PATH=$HOME/gopath/bin:$PATH + - 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 - - make test - - make test-integration - - make test-cri - after_script: - # Abuse travis to preserve the log. - - cat /tmp/test-integration/containerd.log - - cat /tmp/test-cri/containerd.log - go: "1.10.x" +script: + - make install.tools + - make .gitvalidation + - make binaries + - make install.deps + - make containerd + - sudo PATH=$PATH GOPATH=$GOPATH make install-containerd + - make test + - make test-integration + - make test-cri +after_script: + # Abuse travis to preserve the log. + - cat /tmp/test-integration/containerd.log + - cat /tmp/test-cri/containerd.log From 64b067d93fab68368be7dd58f1e13a1d1215c6ad Mon Sep 17 00:00:00 2001 From: Mike Brown Date: Thu, 8 Nov 2018 17:53:47 -0600 Subject: [PATCH 2/2] fix integration test Signed-off-by: Mike Brown --- integration/container_update_resources_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/integration/container_update_resources_test.go b/integration/container_update_resources_test.go index b7e8589e3..8db0884b2 100644 --- a/integration/container_update_resources_test.go +++ b/integration/container_update_resources_test.go @@ -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) }