Skip to content

Commit

Permalink
test: Add import test for RedisDB replica set
Browse files Browse the repository at this point in the history
  • Loading branch information
adeatcu-ionos committed Jul 8, 2024
1 parent 389fbae commit cf0c01e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
32 changes: 32 additions & 0 deletions ionoscloud/import_dbaas_redisdb_replica_set_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//go:build all || dbaas || redis
// +build all dbaas redis

package ionoscloud

import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/ionos-cloud/terraform-provider-ionoscloud/v6/utils/constant"
"testing"
)

func TestAccDBaaSRedisDBReplicaSetImportBasic(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() {
testAccPreCheck(t)
},
ExternalProviders: randomProviderVersion343(),
ProviderFactories: testAccProviderFactories,
CheckDestroy: testAccCheckDBaaSRedisDBReplicaSetDestroyCheck,
Steps: []resource.TestStep{
{
Config: redisDBReplicaSetConfigHashedPassword,
},
{
ResourceName: constant.DBaaSRedisDBReplicaSetResource + "." + constant.DBaaSReplicaSetTestResource,
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"credentials"},
},
},
})
}
3 changes: 3 additions & 0 deletions ionoscloud/resource_dbaas_redisdb_replicaset_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build all || dbaas || redis
// +build all dbaas redis

package ionoscloud

import (
Expand Down

0 comments on commit cf0c01e

Please sign in to comment.