Merge pull request #888 from jingyuanliang/go120

Bump to golang 1.20 to pick up go1.19.6 / go1.20.1 CVE fixes
This commit is contained in:
Casey Callendrello 2023-04-24 17:37:28 +02:00 committed by GitHub
commit c795a3c6b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 4 additions and 10 deletions

View File

@ -4,7 +4,7 @@ name: test
on: ["push", "pull_request"] on: ["push", "pull_request"]
env: env:
GO_VERSION: "1.18" GO_VERSION: "1.20"
LINUX_ARCHES: "amd64 386 arm arm64 s390x mips64le ppc64le riscv64" LINUX_ARCHES: "amd64 386 arm arm64 s390x mips64le ppc64le riscv64"
jobs: jobs:

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/containernetworking/plugins module github.com/containernetworking/plugins
go 1.18 go 1.20
require ( require (
github.com/Microsoft/hcsshim v0.9.8 github.com/Microsoft/hcsshim v0.9.8

View File

@ -15,7 +15,6 @@
package ns_test package ns_test
import ( import (
"math/rand"
"runtime" "runtime"
"testing" "testing"
@ -24,7 +23,6 @@ import (
) )
func TestNs(t *testing.T) { func TestNs(t *testing.T) {
rand.Seed(GinkgoRandomSeed())
runtime.LockOSThread() runtime.LockOSThread()
RegisterFailHandler(Fail) RegisterFailHandler(Fail)

View File

@ -17,7 +17,6 @@ package main
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"io/ioutil"
"net" "net"
"os" "os"
"strings" "strings"
@ -179,7 +178,7 @@ var _ = Describe("Add, check, remove tap plugin", func() {
targetNS, err = testutils.NewNS() targetNS, err = testutils.NewNS()
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
dataDir, err = ioutil.TempDir("", "dummy") dataDir, err = os.MkdirTemp("", "dummy")
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
}) })

View File

@ -15,7 +15,6 @@
package main package main
import ( import (
"math/rand"
"net" "net"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
@ -32,8 +31,6 @@ import (
) )
func TestPortmap(t *testing.T) { func TestPortmap(t *testing.T) {
rand.Seed(GinkgoRandomSeed())
RegisterFailHandler(Fail) RegisterFailHandler(Fail)
RunSpecs(t, "plugins/meta/portmap") RunSpecs(t, "plugins/meta/portmap")
} }

View File

@ -16,7 +16,7 @@ rm -Rf ${SRC_DIR}/${RELEASE_DIR}
mkdir -p ${SRC_DIR}/${RELEASE_DIR} mkdir -p ${SRC_DIR}/${RELEASE_DIR}
mkdir -p ${OUTPUT_DIR} mkdir -p ${OUTPUT_DIR}
$DOCKER run -ti -v ${SRC_DIR}:/go/src/github.com/containernetworking/plugins:z --rm golang:1.18-alpine \ $DOCKER run -ti -v ${SRC_DIR}:/go/src/github.com/containernetworking/plugins:z --rm golang:1.20-alpine \
/bin/sh -xe -c "\ /bin/sh -xe -c "\
apk --no-cache add bash tar; apk --no-cache add bash tar;
cd /go/src/github.com/containernetworking/plugins; umask 0022; cd /go/src/github.com/containernetworking/plugins; umask 0022;