1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

Skip when conditions are not met instead of failing

This commit is contained in:
Ewout Prangsma 2018-03-30 08:56:55 +02:00
parent 07af45c78c
commit 82a655071d
No known key found for this signature in database
GPG key ID: 4DBAD380D93D0698

View file

@ -65,14 +65,13 @@ func TestProduction(t *testing.T) {
deploymentTemplate.Spec.SetDefaults(deploymentTemplate.GetName()) // this must be last
assert.NoError(t, deploymentTemplate.Spec.Validate())
dbserverCount := *deploymentTemplate.Spec.DBServers.Count
dbserverCount := deploymentTemplate.Spec.DBServers.GetCount()
if dbserverCount < 3 {
t.Fatalf("Not enough DBServers to run this test: server count %d", dbserverCount)
t.Skipf("Not enough DBServers to run this test: server count %d", dbserverCount)
}
// Create deployment
_, err = deploymentClient.DatabaseV1alpha().ArangoDeployments(k8sNameSpace).Create(deploymentTemplate)
if err != nil {
if _, err := deploymentClient.DatabaseV1alpha().ArangoDeployments(k8sNameSpace).Create(deploymentTemplate); err != nil {
// REVIEW - should the test already fail here
t.Fatalf("Create deployment failed: %v", err)
}