From 10f88f99cceabad292d1e5bd4a15cd2e6ca29b55 Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Tue, 8 Oct 2019 21:18:00 -0700 Subject: [PATCH 1/4] Fix appveyor test. Signed-off-by: Lantao Liu --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 9469bf7a6..8c2af5ec1 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -22,7 +22,7 @@ install: - ps: $psversiontable build_script: - - bash.exe -elc "mingw32-make" + - bash.exe -elc "mingw32-make.exe" test_script: - - bash.exe -elc "mingw32-make test" + - bash.exe -elc "mingw32-make.exe test" From c368af1bc3e5de7c0bd193e7a81b6318f7d72142 Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Tue, 8 Oct 2019 21:18:25 -0700 Subject: [PATCH 2/4] Configure golangci-lint Signed-off-by: Lantao Liu --- .golangci.yml | 3 ++- Makefile | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 3046f2ac7..38aee5a42 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -18,5 +18,6 @@ run: deadline: 2m skip-dirs: - integration + - pkg/api skip-files: - - ".*_test.go" + - ".*_test.go" diff --git a/Makefile b/Makefile index 5dbfc819d..8545fa1f8 100644 --- a/Makefile +++ b/Makefile @@ -190,7 +190,10 @@ install.tools: .install.gitvalidation .install.golangci-lint .install.vndr ## in .install.golangci-lint: @echo "$(WHALE) $@" - $(GO) get -u github.com/golangci/golangci-lint/cmd/golangci-lint + $(GO) get -d github.com/golangci/golangci-lint/cmd/golangci-lint + @cd $(GOPATH)/src/github.com/golangci/golangci-lint/cmd/golangci-lint; \ + git checkout v1.18.0; \ + go install .install.vndr: @echo "$(WHALE) $@" From 9a1e3655ed034a7494d6c203a00650c779346951 Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Tue, 8 Oct 2019 21:18:34 -0700 Subject: [PATCH 3/4] Update based on default xenial distro. Signed-off-by: Lantao Liu --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a2e1b00f4..868b661ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,16 +21,14 @@ cache: - "${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 # Enable ipv6 for dualstack integration test. - sudo sysctl net.ipv6.conf.all.disable_ipv6=0 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 libseccomp2 + - sudo apt-get install libseccomp-dev - sudo apt-get install socat before_script: From 2a9a982ae36cb0d4186b1e19259c990c62e29f6c Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Wed, 9 Oct 2019 10:48:45 -0700 Subject: [PATCH 4/4] Fix integration test for golang 1.13 Signed-off-by: Lantao Liu --- integration/{test_utils.go => main_test.go} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename integration/{test_utils.go => main_test.go} (99%) diff --git a/integration/test_utils.go b/integration/main_test.go similarity index 99% rename from integration/test_utils.go rename to integration/main_test.go index 869b46355..7993bd4ac 100644 --- a/integration/test_utils.go +++ b/integration/main_test.go @@ -22,6 +22,7 @@ import ( "flag" "fmt" "net" + "os" "os/exec" "strconv" "strings" @@ -63,11 +64,12 @@ var criRoot = flag.String("cri-root", "/var/lib/containerd/io.containerd.grpc.v1 var runtimeHandler = flag.String("runtime-handler", "", "The runtime handler to use in the test.") var containerdBin = flag.String("containerd-bin", "containerd", "The containerd binary name. The name is used to restart containerd during test.") -func init() { +func TestMain(m *testing.M) { flag.Parse() if err := ConnectDaemons(); err != nil { logrus.WithError(err).Fatalf("Failed to connect daemons") } + os.Exit(m.Run()) } // ConnectDaemons connect cri plugin and containerd, and initialize the clients.