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

Fixing Travis CI and use go 1.10 and later versions #11

Open
wants to merge 2 commits into
base: 17.06.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ sudo: required
language: go

go:
- 1.8.x
- 1.10.x
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think docker 17.06 ee is currently built with Go 1.12.x, so it may be good to have that version in this list at least (but given that Go 1.12.x will reach EOL soon, probably have 1.13.x in there as well).

Any reason to remove tip?

- 1.12.x
- 1.13.x
- tip

go_import_path: github.com/containerd/containerd
Expand All @@ -23,7 +25,7 @@ env:
install:
- hack/install-seccomp.sh
- hack/install-runc.sh
- go get -u github.com/golang/lint/golint
- go get -u golang.org/x/lint/golint

script:
- make all
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,18 @@ shell: dbuild
$(DOCKER_RUN) bash

test: validate install bundles-rootfs
go test -bench=. -v $(shell go list ./... | grep -v /vendor | grep -v /integration-test ) -runtime=$(RUNTIME)
go test -bench=. -v $(shell go list ./... | grep -v -e /vendor -e /integration-test -e /pprof) -runtime=$(RUNTIME)
ifneq ($(wildcard /.dockerenv), )
cd integration-test ; \
go test -check.v -check.timeout=$(TEST_TIMEOUT) $(TESTFLAGS) timeout=$(TEST_SUITE_TIMEOUT) github.com/containerd/containerd/integration-test
endif

integration-test:
cd integration-test ; \
go test -check.v -check.timeout=$(TEST_TIMEOUT) $(TESTFLAGS) timeout=$(TEST_SUITE_TIMEOUT) github.com/containerd/containerd/integration-test
go test -parallel 1 -check.v -check.timeout=$(TEST_TIMEOUT) $(TESTFLAGS) timeout=$(TEST_SUITE_TIMEOUT) github.com/containerd/containerd/integration-test

bench: shim validate install bundles-rootfs
go test -bench=. -v $(shell go list ./... | grep -v /vendor | grep -v /integration-test) -runtime=$(RUNTIME)
go test -bench=. -v $(shell go list ./... | grep -v -e /vendor -e /integration-test -e /pprof) -runtime=$(RUNTIME)

validate: fmt lint

Expand Down
3 changes: 2 additions & 1 deletion integration-test/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package main

import (
"path/filepath"
"strings"
"syscall"
"time"

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

t.Assert(echop.io.stdoutBuffer.String(), checker.Equals, "Ay Caramba!")
t.Assert(strings.TrimRight(echop.io.stdoutBuffer.String(), string('\x00')), checker.Equals, "Ay Caramba!")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this due to a change in Go 1.10?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

}

func (cs *ContainerdSuite) TestBusyboxTopExecTop(t *check.C) {
Expand Down
3 changes: 2 additions & 1 deletion integration-test/start_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"
"os/exec"
"path/filepath"
"strings"
"syscall"
"time"

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

t.Assert(*e, checker.Equals, evt)
}
t.Assert(echop.io.stdoutBuffer.String(), checker.Equals, "Success!")
t.Assert(strings.TrimRight(echop.io.stdoutBuffer.String(), string('\x00')), checker.Equals, "Success!")

// Now kill daemon (SIGKILL)
cs.StopDaemon(true)
Expand Down