mock driver: fix no-op setDefaultCreds

The function must modify the content of the "creds" pointer, not the
pointer.

Found via hack/verify-staticcheck.sh after importing the code into
Kubernetes. It is uncertain whether this bug had any consequences.
This commit is contained in:
Patrick Ohly 2021-02-08 20:20:25 +01:00
parent a2a34bb744
commit 92bac8afc1

View File

@ -174,7 +174,7 @@ func stop(lock *sync.Mutex, wg *sync.WaitGroup, server *grpc.Server, running boo
// setDefaultCreds sets the default credentials, given a CSICreds instance.
func setDefaultCreds(creds *CSICreds) {
creds = &CSICreds{
*creds = CSICreds{
CreateVolumeSecret: "secretval1",
DeleteVolumeSecret: "secretval2",
ControllerPublishVolumeSecret: "secretval3",