Skip to content

Commit

Permalink
fixup! factor out method for building serverless test steps
Browse files Browse the repository at this point in the history
  • Loading branch information
fantapop committed Dec 5, 2024
1 parent d21b507 commit 4914afc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions internal/provider/cluster_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func TestAccServerlessUpgradeType(t *testing.T) {
},
// Explicitly updating the value to MANUAL performs the update
{
Config: serverlessClusterStep(clusterName, "STANDARD", slsConfig{
Config: serverlessClusterStep(clusterName, client.PLANTYPE_STANDARD, slsConfig{
vcpus: ptr(6),
upgradeType: ptr(client.UPGRADETYPETYPE_MANUAL),
}).Config,
Expand All @@ -123,7 +123,7 @@ func TestAccServerlessUpgradeType(t *testing.T) {
// BASIC. Currently the ccapi doesn't allow downgrading to BASIC
// unless upgrade_type is AUTOMATIC already.
{
Config: serverlessClusterStep(clusterName, "STANDARD", slsConfig{
Config: serverlessClusterStep(clusterName, client.PLANTYPE_STANDARD, slsConfig{
vcpus: ptr(6),
upgradeType: ptr(client.UPGRADETYPETYPE_AUTOMATIC),
}).Config,
Expand Down Expand Up @@ -1460,7 +1460,10 @@ func serverlessClusterStep(
planType client.PlanType,
config slsConfig,
) resource.TestStep {
testCheckFuncs := []resource.TestCheckFunc{}
testCheckFuncs := []resource.TestCheckFunc{
resource.TestCheckResourceAttr(serverlessResourceName, "delete_protection", "false"),
resource.TestCheckResourceAttr(serverlessDataSourceName, "delete_protection", "false"),
}

var planConfig string
if planType != "" {
Expand Down

0 comments on commit 4914afc

Please sign in to comment.