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",
|
"cm",
|
||||||
"ceph-csi-encryption-kms-config",
|
"ceph-csi-encryption-kms-config",
|
||||||
"--ignore-not-found=true")
|
"--ignore-not-found=true")
|
||||||
Expect(err).Should(BeNil())
|
Expect(err).ShouldNot(HaveOccurred())
|
||||||
|
|
||||||
createORDeleteVault(kubectlCreate)
|
createORDeleteVault(kubectlCreate)
|
||||||
opt := metav1.ListOptions{
|
opt := metav1.ListOptions{
|
||||||
@ -55,11 +55,11 @@ func deployVault(c kubernetes.Interface, deployTimeout int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pods, err := c.CoreV1().Pods(cephCSINamespace).List(context.TODO(), opt)
|
pods, err := c.CoreV1().Pods(cephCSINamespace).List(context.TODO(), opt)
|
||||||
Expect(err).Should(BeNil())
|
Expect(err).ShouldNot(HaveOccurred())
|
||||||
Expect(len(pods.Items)).Should(Equal(1))
|
Expect(pods.Items).Should(HaveLen(1))
|
||||||
name := pods.Items[0].Name
|
name := pods.Items[0].Name
|
||||||
err = waitForPodInRunningState(name, cephCSINamespace, c, deployTimeout, noError)
|
err = waitForPodInRunningState(name, cephCSINamespace, c, deployTimeout, noError)
|
||||||
Expect(err).Should(BeNil())
|
Expect(err).ShouldNot(HaveOccurred())
|
||||||
}
|
}
|
||||||
|
|
||||||
func deleteVault() {
|
func deleteVault() {
|
||||||
@ -123,7 +123,7 @@ func createTenantServiceAccount(c kubernetes.Interface, ns string) error {
|
|||||||
// were created with createTenantServiceAccount.
|
// were created with createTenantServiceAccount.
|
||||||
func deleteTenantServiceAccount(ns string) {
|
func deleteTenantServiceAccount(ns string) {
|
||||||
err := createORDeleteTenantServiceAccount(kubectlDelete, ns)
|
err := createORDeleteTenantServiceAccount(kubectlDelete, ns)
|
||||||
Expect(err).Should(BeNil())
|
Expect(err).ShouldNot(HaveOccurred())
|
||||||
}
|
}
|
||||||
|
|
||||||
// createORDeleteTenantServiceAccount is a helper that reads the tenant-sa.yaml
|
// 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().
|
_, err = c.CoreV1().
|
||||||
PersistentVolumeClaims(updatedPVC.Namespace).
|
PersistentVolumeClaims(updatedPVC.Namespace).
|
||||||
Update(context.TODO(), updatedPVC, metav1.UpdateOptions{})
|
Update(context.TODO(), updatedPVC, metav1.UpdateOptions{})
|
||||||
Expect(err).Should(BeNil())
|
Expect(err).ShouldNot(HaveOccurred())
|
||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
framework.Logf("Waiting up to %v to be in Resized state", pvc)
|
framework.Logf("Waiting up to %v to be in Resized state", pvc)
|
||||||
|
@ -35,7 +35,7 @@ import (
|
|||||||
func getSnapshotClass(path string) snapapi.VolumeSnapshotClass {
|
func getSnapshotClass(path string) snapapi.VolumeSnapshotClass {
|
||||||
sc := snapapi.VolumeSnapshotClass{}
|
sc := snapapi.VolumeSnapshotClass{}
|
||||||
err := unmarshal(path, &sc)
|
err := unmarshal(path, &sc)
|
||||||
Expect(err).Should(BeNil())
|
Expect(err).ShouldNot(HaveOccurred())
|
||||||
|
|
||||||
return sc
|
return sc
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ func getSnapshotClass(path string) snapapi.VolumeSnapshotClass {
|
|||||||
func getSnapshot(path string) snapapi.VolumeSnapshot {
|
func getSnapshot(path string) snapapi.VolumeSnapshot {
|
||||||
sc := snapapi.VolumeSnapshot{}
|
sc := snapapi.VolumeSnapshot{}
|
||||||
err := unmarshal(path, &sc)
|
err := unmarshal(path, &sc)
|
||||||
Expect(err).Should(BeNil())
|
Expect(err).ShouldNot(HaveOccurred())
|
||||||
|
|
||||||
return sc
|
return sc
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user