You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a controller's methods don't require secrets, and no SecretsFile is defined in TestConfig when running tests through GinkgoTest, controller tests will panic as nearly every test passes some sc.Secrets. even if sc.Secrets is nil.
[PANICKED] in [It] - /usr/lib/go/src/runtime/panic.go:262 @ 11/01/24 12:06:32.825
• [PANICKED] [0.002 seconds]
Controller Service [Controller Server] ControllerPublishVolume [It] should fail when no node id is provided
/home/jjulian/dev/go/pkg/mod/github.com/kubernetes-csi/csi-test/[email protected]/pkg/sanity/controller.go:862
[PANICKED] Test Panicked
In [It] at: /usr/lib/go/src/runtime/panic.go:262 @ 11/01/24 12:06:32.825
runtime error: invalid memory address or nil pointer dereference
Full Stack Trace
github.com/kubernetes-csi/csi-test/v5/pkg/sanity.init.func1.9.3()
/home/jjulian/dev/go/pkg/mod/github.com/kubernetes-csi/csi-test/[email protected]/pkg/sanity/controller.go:866 +0x31
This is not happening in ControllerPublishVolume. It never gets called because [pkg/sanity/controller.go 828-841]
It("should fail when the requested volume does not exist", func() {
rsp, err := r.ValidateVolumeCapabilities(
context.Background(),
&csi.ValidateVolumeCapabilitiesRequest{
VolumeId: sc.Config.IDGen.GenerateUniqueValidVolumeID(),
VolumeCapabilities: []*csi.VolumeCapability{
TestVolumeCapabilityWithAccessType(sc, csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER),
},
Secrets: sc.Secrets.ControllerValidateVolumeCapabilitiesSecret,
},
)
ExpectErrorCode(rsp, err, codes.NotFound)
})
is panicking at sc.Secrets.ControllerValidateVolumeCapabilitiesSecret
This should be valid to not include secrets according to pkg/sanity/sanity.go 256-261
Using v5.3.1:
If a controller's methods don't require secrets, and no SecretsFile is defined in TestConfig when running tests through GinkgoTest, controller tests will panic as nearly every test passes some sc.Secrets. even if sc.Secrets is nil.
This is not happening in ControllerPublishVolume. It never gets called because [pkg/sanity/controller.go 828-841]
is panicking at sc.Secrets.ControllerValidateVolumeCapabilitiesSecret
This should be valid to not include secrets according to pkg/sanity/sanity.go 256-261
The text was updated successfully, but these errors were encountered: