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
@ -73,15 +73,14 @@ func TestSetConfigInt(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
currentTT := tt
|
||||
t.Run(currentTT.name, func(t *testing.T) {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
err := setConfigInt(currentTT.args.option, currentTT.args.config, currentTT.args.key)
|
||||
if !errors.Is(err, currentTT.err) {
|
||||
t.Errorf("setConfigInt() error = %v, wantErr %v", err, currentTT.err)
|
||||
err := setConfigInt(tt.args.option, tt.args.config, tt.args.key)
|
||||
if !errors.Is(err, tt.err) {
|
||||
t.Errorf("setConfigInt() error = %v, wantErr %v", err, tt.err)
|
||||
}
|
||||
if err != nil {
|
||||
require.NotEqual(t, currentTT.value, currentTT.args.option)
|
||||
require.NotEqual(t, tt.value, tt.args.option)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user