mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-15 17:51:03 +00:00
Fixed some types and small fixes in tests.
This commit is contained in:
parent
deef3efcc8
commit
628f91385f
3 changed files with 15 additions and 14 deletions
|
@ -29,8 +29,6 @@ import (
|
|||
"github.com/dchest/uniuri"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1alpha"
|
||||
kubeArangoClient "github.com/arangodb/kube-arangodb/pkg/client"
|
||||
//"github.com/arangodb/kube-arangodb/pkg/util"
|
||||
|
@ -41,18 +39,18 @@ func TestPersistence(t *testing.T) {
|
|||
longOrSkip(t)
|
||||
|
||||
k8sNameSpace := getNamespace(t)
|
||||
k8sClient := mustNewKubeClient(t)
|
||||
//k8sClient := mustNewKubeClient(t)
|
||||
|
||||
volumesList, err := k8sClient.CoreV1().PersistentVolumes().List(metav1.ListOptions{})
|
||||
assert.NoError(t, err, "error while listing volumes")
|
||||
claimsList, err := k8sClient.CoreV1().PersistentVolumeClaims(k8sNameSpace).List(metav1.ListOptions{})
|
||||
assert.NoError(t, err, "error while listing volume claims")
|
||||
// volumesList, err := k8sClient.CoreV1().PersistentVolumes().List(metav1.ListOptions{})
|
||||
// assert.NoError(t, err, "error while listing volumes")
|
||||
// claimsList, err := k8sClient.CoreV1().PersistentVolumeClaims(k8sNameSpace).List(metav1.ListOptions{})
|
||||
// assert.NoError(t, err, "error while listing volume claims")
|
||||
|
||||
fmt.Printf("----------------------------------------")
|
||||
fmt.Printf("%v %v", volumesList, claimsList)
|
||||
fmt.Printf("----------------------------------------")
|
||||
fmt.Printf("%v %v", len(volumesList.Items), len(claimsList.Items))
|
||||
fmt.Printf("----------------------------------------")
|
||||
// fmt.Printf("----------------------------------------")
|
||||
// fmt.Printf("%v %v", volumesList, claimsList)
|
||||
// fmt.Printf("----------------------------------------")
|
||||
// fmt.Printf("%v %v", len(volumesList.Items), len(claimsList.Items))
|
||||
// fmt.Printf("----------------------------------------")
|
||||
|
||||
mode := api.DeploymentModeCluster
|
||||
engine := api.StorageEngineRocksDB
|
||||
|
@ -69,7 +67,7 @@ func TestPersistence(t *testing.T) {
|
|||
assert.NoError(t, deploymentTemplate.Spec.Validate())
|
||||
|
||||
// Create deployment
|
||||
_, err = deploymentClient.DatabaseV1alpha().ArangoDeployments(k8sNameSpace).Create(deploymentTemplate)
|
||||
_, err := deploymentClient.DatabaseV1alpha().ArangoDeployments(k8sNameSpace).Create(deploymentTemplate)
|
||||
assert.NoError(t, err, "failed to create deplyment: %s", err)
|
||||
|
||||
_, err = waitUntilDeployment(deploymentClient, deploymentTemplate.GetName(), k8sNameSpace, deploymentIsReady())
|
||||
|
|
|
@ -618,6 +618,9 @@ func waitUntilArangoDeploymentHealthy(deployment *api.ArangoDeployment, DBClient
|
|||
if err := waitUntilClusterHealth(DBClient, func(h driver.ClusterHealth) error {
|
||||
if len(versionString) > 0 {
|
||||
for s, r := range h.Health {
|
||||
if r.Version == "" { // Older versions of arangodb do not export the version string in cluster health
|
||||
continue
|
||||
}
|
||||
if cmp := r.Version.CompareTo(versionString); cmp != 0 {
|
||||
return maskAny(fmt.Errorf("Member %s has version %s, expecting %s", s, r.Version, versionString))
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ func TestUpgradeClusterRocksDB3322Cto342C(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
func TestUpgradeClusterRocksDB3318Cto3322C(t *testing.T) {
|
||||
func TestUpgradeClusterRocksDB3316Cto3322C(t *testing.T) {
|
||||
runUpgradeTest(t, &upgradeTest{
|
||||
fromVersion: "3.3.16",
|
||||
toVersion: "3.3.22",
|
||||
|
|
Loading…
Reference in a new issue