-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add import test for RedisDB replica set
- Loading branch information
1 parent
b92b29a
commit 0a04ba4
Showing
5 changed files
with
51 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"}, | ||
}, | ||
}, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters