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:
parent
07af45c78c
commit
82a655071d
1 changed files with 3 additions and 4 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue