mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +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
@ -76,23 +76,22 @@ func TestParseEncryptionOpts(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
newtt := tt
|
||||
t.Run(newtt.testName, func(t *testing.T) {
|
||||
t.Run(tt.testName, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
actualKMS, actualEnc, actualErr := ParseEncryptionOpts(
|
||||
newtt.volOptions,
|
||||
newtt.fallbackType,
|
||||
tt.volOptions,
|
||||
tt.fallbackType,
|
||||
)
|
||||
if actualKMS != newtt.expectedKMS {
|
||||
t.Errorf("Expected KMS ID: %s, but got: %s", newtt.expectedKMS, actualKMS)
|
||||
if actualKMS != tt.expectedKMS {
|
||||
t.Errorf("Expected KMS ID: %s, but got: %s", tt.expectedKMS, actualKMS)
|
||||
}
|
||||
|
||||
if actualEnc != newtt.expectedEnc {
|
||||
t.Errorf("Expected Encryption Type: %v, but got: %v", newtt.expectedEnc, actualEnc)
|
||||
if actualEnc != tt.expectedEnc {
|
||||
t.Errorf("Expected Encryption Type: %v, but got: %v", tt.expectedEnc, actualEnc)
|
||||
}
|
||||
|
||||
if (actualErr != nil) != newtt.expectedErr {
|
||||
t.Errorf("expected error %v but got %v", newtt.expectedErr, actualErr)
|
||||
if (actualErr != nil) != tt.expectedErr {
|
||||
t.Errorf("expected error %v but got %v", tt.expectedErr, actualErr)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user