From aeaeec881e1758c5eaa906891aeff9f71a6279e2 Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Thu, 14 Jul 2022 12:24:26 +0100 Subject: [PATCH 1/2] Update libgit2 to v1.3.2 Updates golang-with-libgit2-all to v0.1.2 which contains libgit2-1.3.2. Signed-off-by: Paulo Gomes --- Dockerfile | 2 +- Makefile | 2 +- tests/fuzz/oss_fuzz_build.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4efdc142..e136ab47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG GO_VERSION=1.17 ARG XX_VERSION=1.1.0 ARG LIBGIT2_IMG=ghcr.io/fluxcd/golang-with-libgit2-all -ARG LIBGIT2_TAG=v0.1.1 +ARG LIBGIT2_TAG=v0.1.2 FROM ${LIBGIT2_IMG}:${LIBGIT2_TAG} AS libgit2-libs diff --git a/Makefile b/Makefile index 327af68c..e78406f3 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ TAG ?= latest # Base image used to build the Go binary LIBGIT2_IMG ?= ghcr.io/fluxcd/golang-with-libgit2-all -LIBGIT2_TAG ?= v0.1.1 +LIBGIT2_TAG ?= v0.1.2 # Allows for defining additional Go test args, e.g. '-tags integration'. GO_TEST_ARGS ?= -race diff --git a/tests/fuzz/oss_fuzz_build.sh b/tests/fuzz/oss_fuzz_build.sh index b291f76f..b58b94d4 100755 --- a/tests/fuzz/oss_fuzz_build.sh +++ b/tests/fuzz/oss_fuzz_build.sh @@ -16,7 +16,7 @@ set -euxo pipefail -LIBGIT2_TAG="${LIBGIT2_TAG:-v0.1.1}" +LIBGIT2_TAG="${LIBGIT2_TAG:-v0.1.2}" GOPATH="${GOPATH:-/root/go}" GO_SRC="${GOPATH}/src" PROJECT_PATH="github.com/fluxcd/source-controller" From 9c21f8a7a14415b683dffc306a066f4b9e016d4c Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Thu, 14 Jul 2022 18:48:56 +0100 Subject: [PATCH 2/2] tests: fix error message for invalid x509 in darwin Signed-off-by: Paulo Gomes --- controllers/gitrepository_controller_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/controllers/gitrepository_controller_test.go b/controllers/gitrepository_controller_test.go index addd25ca..be4f9cf9 100644 --- a/controllers/gitrepository_controller_test.go +++ b/controllers/gitrepository_controller_test.go @@ -337,7 +337,12 @@ func TestGitRepositoryReconciler_reconcileSource_authStrategy(t *testing.T) { }, wantErr: true, assertConditions: []metav1.Condition{ - *conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.GitOperationFailedReason, "x509: certificate signed by unknown authority"), + // The expected error messages may differ when in darwin. In some cases it will match the + // error message expected in linux: "x509: certificate signed by unknown authority". In + // other cases it may get "x509: “example.com” certificate is not standards compliant" instead. + // + // Trimming the expected error message for consistent results. + *conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.GitOperationFailedReason, "x509: "), }, }, {