mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
cleanup: use errors.As() in e2e/utils
See-also: https://github.com/golang/go/wiki/ErrorValueFAQ#how-should-i-change-my-error-handling-code-to-work-with-the-new-features Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
a47cfbc6c8
commit
c9d5bc8a08
@ -375,7 +375,8 @@ func getSecret(path string) v1.Secret {
|
|||||||
err := unmarshal(path, &sc)
|
err := unmarshal(path, &sc)
|
||||||
// discard corruptInputError
|
// discard corruptInputError
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if _, ok := err.(base64.CorruptInputError); !ok {
|
var b64cie base64.CorruptInputError
|
||||||
|
if !errors.As(err, &b64cie) {
|
||||||
Expect(err).Should(BeNil())
|
Expect(err).Should(BeNil())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user