From 42124caf1d7c743b642691c4bac4230f0f9c4530 Mon Sep 17 00:00:00 2001 From: Surya Seetharaman Date: Tue, 30 May 2023 14:11:52 +0200 Subject: [PATCH] OVNK: UTs: Escape batching package tests We added a new package called: github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util/batching starting in https://github.com/openshift/ovn-kubernetes/pull/1574. Since then we have not been running UTs because the parser gets screwed as we escape on github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util currently. So what happens is: PKGS=$(go list -mod vendor -f '{{if len .TestGoFiles}} {{.ImportPath}} {{end}}' ${PKGS:-./cmd/... ./pkg/... ./hybrid-overlay/...} | xargs) PKGS=${PKGS//"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util"/ } PKGS=$PKGS make test NOROOT=TRUE results in value of PKGS containing "/batching" which leads to stat /batching: directory not found thus blocking the UTs from running. This PR fixes this by escaping util/batching as well. If we want to enable this in the future we can do that, for now fixing the introduced regression in tests. Signed-off-by: Surya Seetharaman --- .../ovn-kubernetes/openshift-ovn-kubernetes-master.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-operator/config/openshift/ovn-kubernetes/openshift-ovn-kubernetes-master.yaml b/ci-operator/config/openshift/ovn-kubernetes/openshift-ovn-kubernetes-master.yaml index 31bae43f33f20..5c01142e02c76 100644 --- a/ci-operator/config/openshift/ovn-kubernetes/openshift-ovn-kubernetes-master.yaml +++ b/ci-operator/config/openshift/ovn-kubernetes/openshift-ovn-kubernetes-master.yaml @@ -174,7 +174,8 @@ tests: commands: | cd go-controller PKGS=$(go list -mod vendor -f '{{if len .TestGoFiles}} {{.ImportPath}} {{end}}' ${PKGS:-./cmd/... ./pkg/... ./hybrid-overlay/...} | xargs) - # this package needs running as a container for TestNewClientset + # these packages need running as a container for TestNewClientset + PKGS=${PKGS//"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util/batching"/ } PKGS=${PKGS//"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util"/ } PKGS=$PKGS make test NOROOT=TRUE container: