Skip to content

Commit

Permalink
Skip when conditions are not met instead of failing
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoutp committed Mar 30, 2018
1 parent 07af45c commit 82a6550
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/environments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 82a6550

Please sign in to comment.