Skip to content

Commit 469e9d1

Browse files
committed
apply nolintlint
Signed-off-by: sivchari <[email protected]>
1 parent ba0699a commit 469e9d1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/cache/cache_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,7 +1544,7 @@ func CacheTest(createCacheFunc func(config *rest.Config, opts cache.Options) (ca
15441544
return obtainedPodNames
15451545
}, ConsistOf(tc.expectedPods)))
15461546
for _, pod := range obtainedStructuredPodList.Items {
1547-
Expect(informer.Get(context.Background(), client.ObjectKeyFromObject(&pod), &pod)).To(Succeed()) //nolint:gosec // We don't retain the pointer
1547+
Expect(informer.Get(context.Background(), client.ObjectKeyFromObject(&pod), &pod)).To(Succeed()) // We don't retain the pointer
15481548
}
15491549

15501550
By("Checking with unstructured")
@@ -1564,7 +1564,7 @@ func CacheTest(createCacheFunc func(config *rest.Config, opts cache.Options) (ca
15641564
return obtainedPodNames
15651565
}, ConsistOf(tc.expectedPods)))
15661566
for _, pod := range obtainedUnstructuredPodList.Items {
1567-
Expect(informer.Get(context.Background(), client.ObjectKeyFromObject(&pod), &pod)).To(Succeed()) //nolint:gosec // We don't retain the pointer
1567+
Expect(informer.Get(context.Background(), client.ObjectKeyFromObject(&pod), &pod)).To(Succeed()) // We don't retain the pointer
15681568
}
15691569

15701570
By("Checking with metadata")
@@ -1584,7 +1584,7 @@ func CacheTest(createCacheFunc func(config *rest.Config, opts cache.Options) (ca
15841584
return obtainedPodNames
15851585
}, ConsistOf(tc.expectedPods)))
15861586
for _, pod := range obtainedMetadataPodList.Items {
1587-
Expect(informer.Get(context.Background(), client.ObjectKeyFromObject(&pod), &pod)).To(Succeed()) //nolint:gosec // We don't retain the pointer
1587+
Expect(informer.Get(context.Background(), client.ObjectKeyFromObject(&pod), &pod)).To(Succeed()) // We don't retain the pointer
15881588
}
15891589
},
15901590
Entry("when selectors are empty it has to inform about all the pods", selectorsTestCase{

tools/setup-envtest/store/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (s *Store) Add(ctx context.Context, item Item, contents io.Reader) (resErr
168168
targetPath := filepath.Base(header.Name)
169169
log.V(1).Info("writing archive file to disk", "archive file", header.Name, "on-disk file", targetPath)
170170
perms := 0555 & header.Mode // make sure we're at most r+x
171-
binOut, err := itemPath.OpenFile(targetPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, os.FileMode(perms))
171+
binOut, err := itemPath.OpenFile(targetPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, os.FileMode(uint32(perms)))
172172
if err != nil {
173173
return fmt.Errorf("unable to create file %s from archive to disk for version-platform pair %s", targetPath, itemName)
174174
}

0 commit comments

Comments
 (0)