Repository: replicatedhq/troubleshoot
Pull request #1058 (2023-03-21 00:00:01)

chore(deps): bump github.com/fatih/color from 1.14.1 to 1.15.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.14.1 to 1.15.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/fatih/color/releases">github.com/fatih/color's releases</a>.</em></p>
<blockquote>
<h2>v1.15.0</h2>
<h2>What's Changed</h2>
<ul>
<li>windows: enable virtual terminal processing, fixes <a href="https://redirect.github.com/fatih/color/issues/169">#169</a> by <a href="https://github.com/martinlindhe"><code>@​martinlindhe</code></a> in <a href="https://redirect.github.com/fatih/color/pull/186">fatih/color#186</a></li>
<li>ci: update dependencies by <a href="https://github.com/fatih"><code>@​fatih</code></a> in <a href="https://redirect.github.com/fatih/color/pull/191">fatih/color#191</a></li>
<li>Bump golang.org/x/sys from 0.5.0 to 0.6.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/fatih/color/pull/189">fatih/color#189</a></li>
<li>Refactor color_windows.go by <a href="https://github.com/pellared"><code>@​pellared</code></a> in <a href="https://redirect.github.com/fatih/color/pull/188">fatih/color#188</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/martinlindhe"><code>@​martinlindhe</code></a> made their first contribution in <a href="https://redirect.github.com/fatih/color/pull/186">fatih/color#186</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/fatih/color/compare/v1.14.1...v1.15.0">https://github.com/fatih/color/compare/v1.14.1...v1.15.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/fatih/color/commit/12126ed593697635c525b302836b292b657ea573"><code>12126ed</code></a> Merge pull request <a href="https://redirect.github.com/fatih/color/issues/188">#188</a> from pellared/patch-1</li>
<li><a href="https://github.com/fatih/color/commit/770038b843547612c49f296a3f5740869cbf97b1"><code>770038b</code></a> Merge branch 'main' into patch-1</li>
<li><a href="https://github.com/fatih/color/commit/c5d9a2b926758e9327c5c5161995487293034990"><code>c5d9a2b</code></a> Merge pull request <a href="https://redirect.github.com/fatih/color/issues/189">#189</a> from fatih/dependabot/go_modules/golang.org/x/sys-0.6.0</li>
<li><a href="https://github.com/fatih/color/commit/1ceb74688cb2b21548e8563b00940c28c53c86d5"><code>1ceb746</code></a> Bump golang.org/x/sys from 0.5.0 to 0.6.0</li>
<li><a href="https://github.com/fatih/color/commit/66a1b893b759b98c01bdc28637b130566208d9ba"><code>66a1b89</code></a> Merge pull request <a href="https://redirect.github.com/fatih/color/issues/191">#191</a> from fatih/update-ci-deps</li>
<li><a href="https://github.com/fatih/color/commit/3228f5ab22c2bf6e5ad1fa16a3e49b3a8d5c5a23"><code>3228f5a</code></a> ci: update dependencies</li>
<li><a href="https://github.com/fatih/color/commit/0226ec9472798d9ca2db66cafe78e856b78aafdc"><code>0226ec9</code></a> Refactor color_windows.go</li>
<li><a href="https://github.com/fatih/color/commit/d080a5b7925fbc23275fea62c8f5d82991bfead4"><code>d080a5b</code></a> Merge pull request <a href="https://redirect.github.com/fatih/color/issues/186">#186</a> from martinlindhe/main</li>
<li><a href="https://github.com/fatih/color/commit/02ab2eaae10c365c22e6f6f2dac0d9cd496f3016"><code>02ab2ea</code></a> windows: enable virtual terminal processing, fixes <a href="https://redirect.github.com/fatih/color/issues/169">#169</a></li>
<li>See full diff in <a href="https://github.com/fatih/color/compare/v1.14.1...v1.15.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/fatih/color&package-manager=go_modules&previous-version=1.14.1&new-version=1.15.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/cmd/troubleshoot/cli/run.go b/cmd/troubleshoot/cli/run.go
index 8d9244c4..d26d3637 100644
--- a/cmd/troubleshoot/cli/run.go
+++ b/cmd/troubleshoot/cli/run.go
@@ -114,11 +114,6 @@ func runTroubleshoot(v *viper.Viper, arg []string) error {
 			return errors.Wrap(err, "unable to parse selector")
 		}
 
-		namespace := ""
-		if v.GetString("namespace") != "" {
-			namespace = v.GetString("namespace")
-		}
-
 		config, err := k8sutil.GetRESTConfig()
 		if err != nil {
 			return errors.Wrap(err, "failed to convert kube flags to rest config")
@@ -129,6 +124,22 @@ func runTroubleshoot(v *viper.Viper, arg []string) error {
 			return errors.Wrap(err, "failed to convert create k8s client")
 		}
 
+		namespace := ""
+
+		if v.GetString("namespace") != "" {
+			namespace = v.GetString("namespace")
+		} else {
+			IsNamespacedScopeRBAC, err := k8sutil.IsNamespacedScopeRBAC(client)
+			if err != nil {
+				return errors.Wrap(err, "failed to check if cluster is namespaced")
+			}
+
+			if !IsNamespacedScopeRBAC {
+				kubeconfig := k8sutil.GetKubeconfig()
+				namespace, _, _ = kubeconfig.Namespace()
+			}
+		}
+
 		var bundlesFromCluster []string
 
 		// Search cluster for Troubleshoot objects in cluster
diff --git a/deploy/.goreleaser.yaml b/deploy/.goreleaser.yaml
index 224e7b58..4ed3914d 100644
--- a/deploy/.goreleaser.yaml
+++ b/deploy/.goreleaser.yaml
@@ -13,7 +13,11 @@ builds:
       - windows
     goarch:
       - amd64
+      - arm
       - arm64
+    ignore:
+      - goos: windows
+        goarch: arm
     env:
       - CGO_ENABLED=0
     main: cmd/preflight/main.go
@@ -32,7 +36,11 @@ builds:
       - windows
     goarch:
       - amd64
+      - arm
       - arm64
+    ignore:
+      - goos: windows
+        goarch: arm
     env:
       - CGO_ENABLED=0
     main: cmd/troubleshoot/main.go
@@ -51,7 +59,11 @@ builds:
       - windows
     goarch:
       - amd64
+      - arm
       - arm64
+    ignore:
+      - goos: windows
+        goarch: arm
     env:
       - CGO_ENABLED=0
     main: cmd/collect/main.go
diff --git a/deploy/krew/preflight.yaml b/deploy/krew/preflight.yaml
index 8b463b3a..4f6da53f 100644
--- a/deploy/krew/preflight.yaml
+++ b/deploy/krew/preflight.yaml
@@ -16,6 +16,17 @@ spec:
     - from: LICENSE
       to: .
     bin: preflight
+  - selector:
+      matchLabels:
+        os: linux
+        arch: arm
+    {{addURIAndSha "https://github.com/replicatedhq/troubleshoot/releases/download/{{ .TagName }}/preflight_linux_arm_6.tar.gz" .TagName }}
+    files:
+    - from: preflight
+      to: .
+    - from: LICENSE
+      to: .
+    bin: preflight
   - selector:
       matchLabels:
         os: darwin
diff --git a/deploy/krew/support-bundle.yaml b/deploy/krew/support-bundle.yaml
index d1602dc9..0b4b1d1d 100644
--- a/deploy/krew/support-bundle.yaml
+++ b/deploy/krew/support-bundle.yaml
@@ -16,6 +16,17 @@ spec:
     - from: LICENSE
       to: .
     bin: support-bundle
+  - selector:
+      matchLabels:
+        os: linux
+        arch: arm
+    {{addURIAndSha "https://github.com/replicatedhq/troubleshoot/releases/download/{{ .TagName }}/support-bundle_linux_arm_6.tar.gz" .TagName }}
+    files:
+    - from: support-bundle
+      to: .
+    - from: LICENSE
+      to: .
+    bin: support-bundle
   - selector:
       matchLabels:
         os: darwin
diff --git a/go.mod b/go.mod
index 5c5b4c42..d9204804 100644
--- a/go.mod
+++ b/go.mod
@@ -8,7 +8,7 @@ require (
 	github.com/blang/semver/v4 v4.0.0
 	github.com/containers/image/v5 v5.24.2
 	github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2
-	github.com/fatih/color v1.14.1
+	github.com/fatih/color v1.15.0
 	github.com/go-logr/logr v1.2.3
 	github.com/go-redis/redis/v7 v7.4.1
 	github.com/go-sql-driver/mysql v1.7.0
@@ -189,7 +189,7 @@ require (
 	golang.org/x/crypto v0.6.0 // indirect
 	golang.org/x/net v0.7.0 // indirect
 	golang.org/x/oauth2 v0.4.0 // indirect
-	golang.org/x/sys v0.5.0 // indirect
+	golang.org/x/sys v0.6.0 // indirect
 	golang.org/x/term v0.5.0 // indirect
 	golang.org/x/text v0.7.0
 	golang.org/x/time v0.3.0 // indirect
diff --git a/go.sum b/go.sum
index 640aca97..caa6188d 100644
--- a/go.sum
+++ b/go.sum
@@ -515,8 +515,8 @@ github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQL
 github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww=
 github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4=
 github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
-github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w=
-github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg=
+github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
+github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
 github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
 github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
 github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
@@ -1508,8 +1508,9 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
 golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
+golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
 golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
diff --git a/pkg/analyze/analyzer.go b/pkg/analyze/analyzer.go
index 9fd72878..d6693988 100644
--- a/pkg/analyze/analyzer.go
+++ b/pkg/analyze/analyzer.go
@@ -2,6 +2,7 @@ package analyzer
 
 import (
 	"context"
+	"encoding/json"
 	"fmt"
 	"reflect"
 	"strconv"
@@ -235,3 +236,26 @@ func getAnalyzer(analyzer *troubleshootv1beta2.Analyze) Analyzer {
 		return nil
 	}
 }
+
+// deduplicates a list of troubleshootv1beta2.Analyze objects
+// marshals object to json and then uses its string value to check for uniqueness
+// there is no sorting of the keys in the analyze object's spec so if the spec isn't an exact match line for line as written, no dedup will occur
+func DedupAnalyzers(allAnalyzers []*troubleshootv1beta2.Analyze) []*troubleshootv1beta2.Analyze {
+	uniqueAnalyzers := make(map[string]bool)
+	finalAnalyzers := []*troubleshootv1beta2.Analyze{}
+
+	for _, analyzer := range allAnalyzers {
+		data, err := json.Marshal(analyzer)
+		if err != nil {
+			// return analyzer as is if for whatever reason it can't be marshalled into json
+			finalAnalyzers = append(finalAnalyzers, analyzer)
+		} else {
+			stringData := string(data)
+			if _, value := uniqueAnalyzers[stringData]; !value {
+				uniqueAnalyzers[stringData] = true
+				finalAnalyzers = append(finalAnalyzers, analyzer)
+			}
+		}
+	}
+	return finalAnalyzers
+}
diff --git a/pkg/collect/longhorn.go b/pkg/collect/longhorn.go
index 45c525cb..0a00c5c3 100644
--- a/pkg/collect/longhorn.go
+++ b/pkg/collect/longhorn.go
@@ -276,19 +276,24 @@ func (c *CollectLonghorn) Collect(progressChan chan<- interface{}) (CollectorRes
 			}
 
 			wg.Add(1)
-			go func(replica longhornv1beta1types.Replica) {
+			go func(repl *longhornv1beta1types.Replica, pName string, cfg *rest.Config, vol *longhornv1beta1types.Volume) {
 				defer wg.Done()
-				checksums, err := GetLonghornReplicaChecksum(c.ClientConfig, replica, podName)
+				checksums, err := GetLonghornReplicaChecksum(cfg, *repl, pName)
 				if err != nil {
-					klog.Errorf("Failed to get replica %s checksum: %v", replica.Name, err)
+					klog.Errorf("Failed to get replica %q checksum: %v", repl.Name, err)
 					return
 				}
 				volsDir := GetLonghornVolumesDirectory(ns)
-				key := filepath.Join(volsDir, volume.Name, "replicachecksums", replica.Name+".txt")
+				key := filepath.Join(volsDir, vol.Name, "replicachecksums", repl.Name+".txt")
+
+				// Locking is required because the output object is shared between goroutines
 				mtx.Lock()
 				output.SaveResult(c.BundlePath, key, bytes.NewBuffer([]byte(checksums)))
 				mtx.Unlock()
-			}(replica)
+
+				// make separate new copies of CR objects so as not to share internal memory
+				// of objects between goroutines
+			}(replica.DeepCopy(), podName, rest.CopyConfig(c.ClientConfig), volume.DeepCopy())
 		}
 	}
 
diff --git a/pkg/k8sutil/namespace.go b/pkg/k8sutil/namespace.go
new file mode 100644
index 00000000..0d6ec0b3
--- /dev/null
+++ b/pkg/k8sutil/namespace.go
@@ -0,0 +1,34 @@
+package k8sutil
+
+import (
+	"context"
+
+	authorizationv1 "k8s.io/api/authorization/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/client-go/kubernetes"
+)
+
+func IsNamespacedScopeRBAC(client kubernetes.Interface) (bool, error) {
+	ctx := context.Background()
+
+	sar := &authorizationv1.SelfSubjectAccessReview{
+		Spec: authorizationv1.SelfSubjectAccessReviewSpec{
+			ResourceAttributes: &authorizationv1.ResourceAttributes{
+				Namespace: "",
+				Verb:      "list",
+				Resource:  "secrets,configmaps",
+			},
+		},
+	}
+
+	resp, err := client.AuthorizationV1().SelfSubjectAccessReviews().Create(ctx, sar, metav1.CreateOptions{})
+	if err != nil {
+		return false, err
+	}
+
+	if resp.Status.Allowed {
+		return true, nil
+	} else {
+		return false, nil
+	}
+}
diff --git a/pkg/supportbundle/supportbundle.go b/pkg/supportbundle/supportbundle.go
index 9783b923..019fa30f 100644
--- a/pkg/supportbundle/supportbundle.go
+++ b/pkg/supportbundle/supportbundle.go
@@ -255,6 +255,7 @@ func AnalyzeSupportBundle(ctx context.Context, spec *troubleshootv1beta2.Support
 	if len(spec.Analyzers) == 0 && len(spec.HostAnalyzers) == 0 {
 		return nil, nil
 	}
+	spec.Analyzers = analyzer.DedupAnalyzers(spec.Analyzers)
 	analyzeResults, err := analyzer.AnalyzeLocal(ctx, tmpDir, spec.Analyzers, spec.HostAnalyzers)
 	if err != nil {
 		return nil, errors.Wrap(err, "failed to analyze support bundle")


Test patch:
diff --git a/.github/workflows/build-test-deploy.yaml b/.github/workflows/build-test-deploy.yaml
index cf69b20b..186bd7b5 100644
--- a/.github/workflows/build-test-deploy.yaml
+++ b/.github/workflows/build-test-deploy.yaml
@@ -232,12 +232,14 @@ jobs:
       matrix:
         goarch: [amd64, arm64]
         goos: [darwin, linux, windows]
+        include:
+          - goarch: arm
+            goos: linux
     steps:
       - name: Checkout
         uses: actions/checkout@v3
-
-      - name: Unshallow
-        run: git fetch --prune --unshallow
+        with:
+          fetch-depth: 0
 
       - uses: actions/setup-go@v3
         with:
@@ -262,15 +264,14 @@ jobs:
     steps:
       - name: Checkout
         uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
 
       - uses: azure/docker-login@v1
         with:
           username: ${{ secrets.DOCKERHUB_USER }}
           password: ${{ secrets.DOCKERHUB_PASSWORD }}
 
-      - name: Unshallow
-        run: git fetch --prune --unshallow
-
       - uses: actions/setup-go@v3
         with:
           go-version: "1.19"
diff --git a/pkg/analyze/analyzer_test.go b/pkg/analyze/analyzer_test.go
index 59739664..1832cb73 100644
--- a/pkg/analyze/analyzer_test.go
+++ b/pkg/analyze/analyzer_test.go
@@ -72,3 +72,97 @@ func TestAnalyzeWithNilAnalyzer(t *testing.T) {
 	assert.Error(t, err)
 	assert.Nil(t, got)
 }
+
+func TestCollector_DedupCollectors(t *testing.T) {
+	tests := []struct {
+		name      string
+		Analyzers []*troubleshootv1beta2.Analyze
+		want      []*troubleshootv1beta2.Analyze
+	}{
+		{
+			name: "multiple ClusterVersion",
+			Analyzers: []*troubleshootv1beta2.Analyze{
+				{
+					ClusterVersion: &troubleshootv1beta2.ClusterVersion{},
+				},
+				{
+					ClusterVersion: &troubleshootv1beta2.ClusterVersion{},
+				},
+			},
+			want: []*troubleshootv1beta2.Analyze{
+				{
+					ClusterVersion: &troubleshootv1beta2.ClusterVersion{},
+				},
+			},
+		},
+		{
+			name: "multiple TextAnalyze",
+			Analyzers: []*troubleshootv1beta2.Analyze{
+				{
+					TextAnalyze: &troubleshootv1beta2.TextAnalyze{
+						AnalyzeMeta: troubleshootv1beta2.AnalyzeMeta{
+							CheckName: "hi",
+						},
+					},
+				},
+				{
+					TextAnalyze: &troubleshootv1beta2.TextAnalyze{
+						AnalyzeMeta: troubleshootv1beta2.AnalyzeMeta{
+							CheckName: "hi",
+						},
+					},
+				},
+			},
+			want: []*troubleshootv1beta2.Analyze{
+				{
+					TextAnalyze: &troubleshootv1beta2.TextAnalyze{
+						AnalyzeMeta: troubleshootv1beta2.AnalyzeMeta{
+							CheckName: "hi",
+						},
+					},
+				},
+			},
+		},
+		{
+			name: "multiple TextAnalyze with different CheckName",
+			Analyzers: []*troubleshootv1beta2.Analyze{
+				{
+					TextAnalyze: &troubleshootv1beta2.TextAnalyze{
+						AnalyzeMeta: troubleshootv1beta2.AnalyzeMeta{
+							CheckName: "hi",
+						},
+					},
+				},
+				{
+					TextAnalyze: &troubleshootv1beta2.TextAnalyze{
+						AnalyzeMeta: troubleshootv1beta2.AnalyzeMeta{
+							CheckName: "test",
+						},
+					},
+				},
+			},
+			want: []*troubleshootv1beta2.Analyze{
+				{
+					TextAnalyze: &troubleshootv1beta2.TextAnalyze{
+						AnalyzeMeta: troubleshootv1beta2.AnalyzeMeta{
+							CheckName: "hi",
+						},
+					},
+				},
+				{
+					TextAnalyze: &troubleshootv1beta2.TextAnalyze{
+						AnalyzeMeta: troubleshootv1beta2.AnalyzeMeta{
+							CheckName: "test",
+						},
+					},
+				},
+			},
+		},
+	}
+	for _, tc := range tests {
+		t.Run(tc.name, func(t *testing.T) {
+			got := DedupAnalyzers(tc.Analyzers)
+			assert.Equal(t, tc.want, got)
+		})
+	}
+}