Skip to content

Commit

Permalink
acc: Remove deployment.Healthy check (#50)
Browse files Browse the repository at this point in the history
Removes the acceptance `deployment.Healthy` since it creates a lot of
instability in the acceptance test results.

Signed-off-by: Marc Lopez <[email protected]>
  • Loading branch information
marclop authored Aug 24, 2020
1 parent 095b49c commit 2a2f4e8
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions ec/acc/deployment_checks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package acc
import (
"fmt"

"github.com/elastic/cloud-sdk-go/pkg/api"
"github.com/elastic/cloud-sdk-go/pkg/api/deploymentapi"
"github.com/elastic/cloud-sdk-go/pkg/api/deploymentapi/deputil"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
Expand All @@ -41,23 +42,14 @@ func testAccCheckDeploymentExists(name string) resource.TestCheckFunc {
return err
}

res, err := deploymentapi.Get(deploymentapi.GetParams{
return api.ReturnErrOnly(deploymentapi.Get(deploymentapi.GetParams{
API: client,
DeploymentID: saved.Primary.ID,
QueryParams: deputil.QueryParams{
ShowSettings: true,
ShowPlans: true,
ShowMetadata: true,
},
})
if err != nil {
return err
}

if !*res.Healthy {
return fmt.Errorf("created deployment is unhealthy: please check the configuration")
}

return nil
}))
}
}

0 comments on commit 2a2f4e8

Please sign in to comment.