mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 03:57:41 +00:00
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:
parent
a2a34bb744
commit
92bac8afc1
@ -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.
|
// setDefaultCreds sets the default credentials, given a CSICreds instance.
|
||||||
func setDefaultCreds(creds *CSICreds) {
|
func setDefaultCreds(creds *CSICreds) {
|
||||||
creds = &CSICreds{
|
*creds = CSICreds{
|
||||||
CreateVolumeSecret: "secretval1",
|
CreateVolumeSecret: "secretval1",
|
||||||
DeleteVolumeSecret: "secretval2",
|
DeleteVolumeSecret: "secretval2",
|
||||||
ControllerPublishVolumeSecret: "secretval3",
|
ControllerPublishVolumeSecret: "secretval3",
|
||||||
|
Loading…
Reference in New Issue
Block a user