diff --git a/.github/workflows/buildTests.yaml b/.github/workflows/buildTests.yaml index ffd371a..a271090 100644 --- a/.github/workflows/buildTests.yaml +++ b/.github/workflows/buildTests.yaml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - go: [ "1.22.7" ] + go: [ "1.23.3" ] steps: - name: Check out code into the Go module directory uses: actions/checkout@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c291815..f9e3841 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ on: - created env: - GO_VERSION: "1.22.7" + GO_VERSION: "1.23.3" REPOSITORY: flannel/flannel-cni-plugin jobs: diff --git a/Makefile b/Makefile index 5db1b4d..f0446f8 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ GO?=$(go) GOPATH?=$(go env GOPATH) # this is the upstream CNI plugin version used for testing -TEST_TAG?=v1.4.1 +TEST_TAG?=v1.6.0 # Only enable CGO (and build the UDP backend) on AMD64 ifeq ($(ARCH),amd64) @@ -21,7 +21,7 @@ else endif # Go version to use for builds. Can be overridden -GOLANG_VERSION?=1.22.7 +GOLANG_VERSION?=1.23.3 build_all: vendor build_all_linux build_windows @echo "All arches should be built for $(TAG)" diff --git a/flannel_linux_test.go b/flannel_linux_test.go index eecf54d..d8462b8 100644 --- a/flannel_linux_test.go +++ b/flannel_linux_test.go @@ -27,6 +27,13 @@ import ( . "github.com/onsi/gomega" ) +func deleteNamespace(ns ns.NetNS) error { + if err := ns.Close(); err != nil { + return err + } + return testutils.UnmountNS(ns) +} + var _ = Describe("Flannel", func() { var ( originalNS ns.NetNS @@ -48,7 +55,7 @@ var _ = Describe("Flannel", func() { }) AfterEach(func() { - Expect(originalNS.Close()).To(Succeed()) + Expect(deleteNamespace(originalNS)).To(Succeed()) }) const hostLocalDataDir = "/var/lib/cni/networks/cni-flannel" @@ -159,7 +166,7 @@ FLANNEL_IPMASQ=true targetNs, err := testutils.NewNS() Expect(err).NotTo(HaveOccurred()) - defer targetNs.Close() + defer deleteNamespace(targetNs) args := &skel.CmdArgs{ ContainerID: "some-container-id-ipv4", @@ -238,7 +245,7 @@ FLANNEL_IPMASQ=true targetNs, err := testutils.NewNS() Expect(err).NotTo(HaveOccurred()) - defer targetNs.Close() + defer deleteNamespace(targetNs) args := &skel.CmdArgs{ ContainerID: "some-container-id-ipv4-multiple", @@ -320,7 +327,7 @@ FLANNEL_IPMASQ=true targetNs, err := testutils.NewNS() Expect(err).NotTo(HaveOccurred()) - defer targetNs.Close() + defer deleteNamespace(targetNs) args := &skel.CmdArgs{ ContainerID: "some-container-id-ipv6", @@ -399,7 +406,7 @@ FLANNEL_IPMASQ=true targetNs, err := testutils.NewNS() Expect(err).NotTo(HaveOccurred()) - defer targetNs.Close() + defer deleteNamespace(targetNs) args := &skel.CmdArgs{ ContainerID: "some-container-id-dual-stack", diff --git a/go.mod b/go.mod index b86afa4..6b68f68 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,6 @@ module github.com/flannel-io/cni-plugin -go 1.22 -toolchain go1.23.2 +go 1.23 require ( github.com/containernetworking/cni v1.2.3 diff --git a/scripts/test_linux.sh b/scripts/test_linux.sh index ab38685..7fd643e 100755 --- a/scripts/test_linux.sh +++ b/scripts/test_linux.sh @@ -23,7 +23,7 @@ function download_cnis { function testrun { download_cnis - sudo -E bash -c "umask 0; PATH=${GOPATH}/dist:$(pwd)/dist:${PATH} go test $@" + sudo -E bash -c "umask 0; PATH=${GOPATH}/dist:$(pwd)/dist:${PATH} go test -count=1 $@" } COVERALLS=${COVERALLS:-""} diff --git a/scripts/version.sh b/scripts/version.sh index 4c8f4b0..aa12eaf 100755 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -34,7 +34,7 @@ PLATFORM=${GOOS}-${GOARCH} RELEASE=${PROG}-${GOARCH} # hardcode versions unless set specifically VERSION=${VERSION:-v1.0.0} -GOLANG_VERSION=${GOLANG_VERSION:-1.22.7} +GOLANG_VERSION=${GOLANG_VERSION:-1.23.3} if [ -d .git ]; then if [ -z "${GIT_TAG}" ]; then