Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.

Commit d7736dd

Browse files
committed
Update travis to use go 1.10.x for fixing CI
To fix "go get -u github.com/golang/lint/golint" error. golang/lint#421 Also fix integratinon test when using golang 1.10.x In AddProcessToContainer(), the returned stdout buffer has x00 padded, after it is converted to string, it still has padded zeros. This commit trims the padded zeros in string. Replace "github.com/golang/lint/golint" with "golang.org/x/lint/golint" from below error message: (this is needed for golang 1.12 or later) ``` package github.com/golang/lint/golint: code in directory /home/travis/gopath/src/github.com/golang/lint/golint expects import "golang.org/x/lint/golint" ``` Signed-off-by: Xinfeng Liu <xinfeng.liu@gmail.com>
1 parent 6e23458 commit d7736dd

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.travis.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ sudo: required
44
language: go
55

66
go:
7-
- 1.8.x
8-
- tip
7+
- 1.10.x
98

109
go_import_path: github.com/containerd/containerd
1110

@@ -23,7 +22,7 @@ env:
2322
install:
2423
- hack/install-seccomp.sh
2524
- hack/install-runc.sh
26-
- go get -u github.com/golang/lint/golint
25+
- go get -u golang.org/x/lint/golint
2726

2827
script:
2928
- make all

integration-test/exec_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package main
44

55
import (
66
"path/filepath"
7+
"strings"
78
"syscall"
89
"time"
910

@@ -58,7 +59,7 @@ func (cs *ContainerdSuite) TestBusyboxTopExecEcho(t *check.C) {
5859
t.Assert(*e, checker.Equals, evt)
5960
}
6061

61-
t.Assert(echop.io.stdoutBuffer.String(), checker.Equals, "Ay Caramba!")
62+
t.Assert(strings.TrimRight(echop.io.stdoutBuffer.String(), string('\x00')), checker.Equals, "Ay Caramba!")
6263
}
6364

6465
func (cs *ContainerdSuite) TestBusyboxTopExecTop(t *check.C) {

integration-test/start_linux_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"os"
66
"os/exec"
77
"path/filepath"
8+
"strings"
89
"syscall"
910
"time"
1011

@@ -439,7 +440,7 @@ func (cs *ContainerdSuite) TestRestart(t *check.C) {
439440

440441
t.Assert(*e, checker.Equals, evt)
441442
}
442-
t.Assert(echop.io.stdoutBuffer.String(), checker.Equals, "Success!")
443+
t.Assert(strings.TrimRight(echop.io.stdoutBuffer.String(), string('\x00')), checker.Equals, "Success!")
443444

444445
// Now kill daemon (SIGKILL)
445446
cs.StopDaemon(true)

0 commit comments

Comments
 (0)