mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
build: address ginkgolinter
warnings
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
dee6be6832
commit
4a6c27274f
@ -47,7 +47,7 @@ func deployVault(c kubernetes.Interface, deployTimeout int) {
|
||||
"cm",
|
||||
"ceph-csi-encryption-kms-config",
|
||||
"--ignore-not-found=true")
|
||||
Expect(err).Should(BeNil())
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
|
||||
createORDeleteVault(kubectlCreate)
|
||||
opt := metav1.ListOptions{
|
||||
@ -55,11 +55,11 @@ func deployVault(c kubernetes.Interface, deployTimeout int) {
|
||||
}
|
||||
|
||||
pods, err := c.CoreV1().Pods(cephCSINamespace).List(context.TODO(), opt)
|
||||
Expect(err).Should(BeNil())
|
||||
Expect(len(pods.Items)).Should(Equal(1))
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
Expect(pods.Items).Should(HaveLen(1))
|
||||
name := pods.Items[0].Name
|
||||
err = waitForPodInRunningState(name, cephCSINamespace, c, deployTimeout, noError)
|
||||
Expect(err).Should(BeNil())
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
}
|
||||
|
||||
func deleteVault() {
|
||||
@ -123,7 +123,7 @@ func createTenantServiceAccount(c kubernetes.Interface, ns string) error {
|
||||
// were created with createTenantServiceAccount.
|
||||
func deleteTenantServiceAccount(ns string) {
|
||||
err := createORDeleteTenantServiceAccount(kubectlDelete, ns)
|
||||
Expect(err).Should(BeNil())
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
}
|
||||
|
||||
// createORDeleteTenantServiceAccount is a helper that reads the tenant-sa.yaml
|
||||
|
@ -45,7 +45,7 @@ func expandPVCSize(c kubernetes.Interface, pvc *v1.PersistentVolumeClaim, size s
|
||||
_, err = c.CoreV1().
|
||||
PersistentVolumeClaims(updatedPVC.Namespace).
|
||||
Update(context.TODO(), updatedPVC, metav1.UpdateOptions{})
|
||||
Expect(err).Should(BeNil())
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
|
||||
start := time.Now()
|
||||
framework.Logf("Waiting up to %v to be in Resized state", pvc)
|
||||
|
@ -35,7 +35,7 @@ import (
|
||||
func getSnapshotClass(path string) snapapi.VolumeSnapshotClass {
|
||||
sc := snapapi.VolumeSnapshotClass{}
|
||||
err := unmarshal(path, &sc)
|
||||
Expect(err).Should(BeNil())
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
|
||||
return sc
|
||||
}
|
||||
@ -43,7 +43,7 @@ func getSnapshotClass(path string) snapapi.VolumeSnapshotClass {
|
||||
func getSnapshot(path string) snapapi.VolumeSnapshot {
|
||||
sc := snapapi.VolumeSnapshot{}
|
||||
err := unmarshal(path, &sc)
|
||||
Expect(err).Should(BeNil())
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
|
||||
return sc
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user