From 6eb1e9ccf624e9b0d7a6534b8422452e83cf2231 Mon Sep 17 00:00:00 2001 From: afdesk Date: Fri, 24 Jan 2025 18:22:09 +0600 Subject: [PATCH] chore: fix linter errors --- magefiles/magefile.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/magefiles/magefile.go b/magefiles/magefile.go index b6d7ac23cbb1..5e061a11ad75 100644 --- a/magefiles/magefile.go +++ b/magefiles/magefile.go @@ -309,6 +309,9 @@ func (t Test) K8s() error { }() // wait for the kind cluster is running correctly err = sh.RunWithV(ENV, "kubectl", "wait", "--for=condition=Ready", "nodes", "--all", "--timeout=300s") + if err != nil { + return fmt.Errorf("can't wait for the kind cluster: %w", err) + } err = sh.RunWithV(ENV, "kubectl", "apply", "-f", "./integration/testdata/fixtures/k8s/test_nginx.yaml") if err != nil { @@ -345,7 +348,7 @@ func initk8sLimitedUserEnv() error { return err } } - envs := map[string]string{} + envs := make(map[string]string) var err error envs["CA"], err = sh.Output("kubectl", "config", "view", "-o", "jsonpath=\"{.clusters[?(@.name == 'kind-kind-test')].cluster.certificate-authority-data}\"", "--flatten") if err != nil {