mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
build: address 'copyloopvar' linter warning
golangci-lint reports these: The copy of the 'for' variable "kmsID" can be deleted (Go 1.22+) (copyloopvar) Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
9321fe03c3
commit
0e7b06e9d0
@ -514,8 +514,6 @@ var _ = Describe(cephfsType, func() {
|
||||
}
|
||||
|
||||
for kmsID, kmsConf := range kmsToTest {
|
||||
kmsID := kmsID
|
||||
kmsConf := kmsConf
|
||||
By("create a storageclass with pool and an encrypted PVC then bind it to an app with "+kmsID, func() {
|
||||
scOpts := map[string]string{
|
||||
"encrypted": "true",
|
||||
@ -1649,7 +1647,6 @@ var _ = Describe(cephfsType, func() {
|
||||
|
||||
if testCephFSFscrypt {
|
||||
for _, kmsID := range []string{"secrets-metadata-test", "vault-test"} {
|
||||
kmsID := kmsID
|
||||
By("checking encrypted snapshot-backed volume with KMS "+kmsID, func() {
|
||||
err := deleteResource(cephFSExamplePath + "storageclass.yaml")
|
||||
if err != nil {
|
||||
@ -2234,8 +2231,6 @@ var _ = Describe(cephfsType, func() {
|
||||
"vault-test": vaultKMS,
|
||||
}
|
||||
for kmsID, kmsConf := range kmsToTest {
|
||||
kmsID := kmsID
|
||||
kmsConf := kmsConf
|
||||
By("create an encrypted PVC-PVC clone and bind it to an app with "+kmsID, func() {
|
||||
err := deleteResource(cephFSExamplePath + "storageclass.yaml")
|
||||
if err != nil {
|
||||
|
@ -75,7 +75,6 @@ Error from server (AlreadyExists): error when creating "STDIN": deployments.apps
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
if got := getStdErr(tt.errString); got != tt.expected {
|
||||
|
Reference in New Issue
Block a user