From 3d277d0467b0324ef27db445936b188e65fa4526 Mon Sep 17 00:00:00 2001 From: Sergei Lukianov Date: Sat, 27 Apr 2024 22:25:24 -0700 Subject: [PATCH] Fix text/lint errors --- .golangci.yml | 1 + Makefile | 2 +- cmd/hhfab/main.go | 2 ++ pkg/fab/vlab/testing.go | 6 +----- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 5196344c4..23039d95c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -16,6 +16,7 @@ run: timeout: 10m build-tags: - containers_image_openpgp + - containers_image_storage_stub linters: disable-all: true # Look at this for details: https://golangci-lint.run/usage/linters/ diff --git a/Makefile b/Makefile index 688331473..ae1e4d294 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ vet: ## Run go vet against code. .PHONY: test test: fmt vet envtest ## Run tests. - go test --coverprofile cover.out --tags containers_image_openpgp ./... + go test --coverprofile cover.out --tags containers_image_openpgp,containers_image_storage_stub ./... .PHONY: lint-lic lint-lic: addlicense ## Run addlicense to check if all files have the license header. diff --git a/cmd/hhfab/main.go b/cmd/hhfab/main.go index 7c929be1a..49655e933 100644 --- a/cmd/hhfab/main.go +++ b/cmd/hhfab/main.go @@ -67,6 +67,8 @@ func setupLogger(verbose, brief bool) error { slog.Debug("\n" + motd) slog.Debug("Version: " + version) + vlab.SetupCtrlRuntimeLogs() + return nil } diff --git a/pkg/fab/vlab/testing.go b/pkg/fab/vlab/testing.go index a45ab584f..e3d7bbb6a 100644 --- a/pkg/fab/vlab/testing.go +++ b/pkg/fab/vlab/testing.go @@ -45,12 +45,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" ) -func init() { - setupCtrlRuntimeLogs() -} - // TODO properly handle logging config for ctrl runtime -func setupCtrlRuntimeLogs() { +func SetupCtrlRuntimeLogs() { opts := zap.Options{ Development: true, }