Skip to content

Commit 571c0cb

Browse files
author
lamai93
committed
Tests wait for PVC to be resized.
1 parent 1c1a6f1 commit 571c0cb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/persistent_volumes_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ import (
3434

3535
api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1alpha"
3636
kubeArangoClient "github.com/arangodb/kube-arangodb/pkg/client"
37+
"github.com/arangodb/kube-arangodb/pkg/util/k8sutil"
3738
corev1 "k8s.io/api/core/v1"
38-
3939
"k8s.io/apimachinery/pkg/api/resource"
4040
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
4141
//"github.com/arangodb/kube-arangodb/pkg/util"
@@ -161,9 +161,12 @@ func TestPVCResize(t *testing.T) {
161161
if volumeSize.Cmp(size10GB) != 0 {
162162
return fmt.Errorf("wrong volume size: expected: %s, found: %s", size10GB.String(), volumeSize.String())
163163
}
164+
if k8sutil.IsPersistentVolumeClaimFileSystemResizePending(pvc) {
165+
return fmt.Errorf("persistent volume claim file system resize pending")
166+
}
164167
}
165168
return nil
166-
}, 1*time.Minute); err != nil {
169+
}, 5*time.Minute); err != nil {
167170
t.Fatalf("PVCs not resized: %s", err.Error())
168171
}
169172

0 commit comments

Comments
 (0)