Skip to content

Commit b601ed3

Browse files
committed
Fix golangci-lint issues
1 parent d36f149 commit b601ed3

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

internal/cmd/controller/options/calculate_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestMergeChain(t *testing.T) {
1616
Helm: &fleet.HelmOptions{
1717
ReleaseName: "base-release",
1818
Values: &fleet.GenericMap{
19-
Data: map[string]interface{}{
19+
Data: map[string]any{
2020
"source": "base",
2121
"edge": "false",
2222
"extra": "false",
@@ -28,7 +28,7 @@ func TestMergeChain(t *testing.T) {
2828
edgeCustomization := fleet.BundleDeploymentOptions{
2929
Helm: &fleet.HelmOptions{
3030
Values: &fleet.GenericMap{
31-
Data: map[string]interface{}{
31+
Data: map[string]any{
3232
"source": "edge",
3333
"edge": "true",
3434
},
@@ -39,7 +39,7 @@ func TestMergeChain(t *testing.T) {
3939
extraCustomization := fleet.BundleDeploymentOptions{
4040
Helm: &fleet.HelmOptions{
4141
Values: &fleet.GenericMap{
42-
Data: map[string]interface{}{
42+
Data: map[string]any{
4343
"source": "extra",
4444
"extra": "true",
4545
},

internal/cmd/controller/target/matcher/bundlematch_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ func TestHasMatchingRestriction(t *testing.T) {
8383
// targetCustomizations come first in Targets, followed by the GitRepo target.
8484
// The GitRepo target is also added as a TargetRestriction.
8585
func makeBundle(gitRepoTarget fleet.BundleTarget, customizations []fleet.BundleTarget) *fleet.Bundle {
86-
targets := append(customizations, gitRepoTarget)
86+
targets := make([]fleet.BundleTarget, 0, len(customizations)+1)
87+
targets = append(targets, customizations...)
88+
targets = append(targets, gitRepoTarget)
8789
b := &fleet.Bundle{
8890
Spec: fleet.BundleSpec{
8991
Targets: targets,

0 commit comments

Comments
 (0)