fix: remove identity from sqlserverbeta and postresflexalpha
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 6s
TF Acceptance Tests Workflow / Acceptance Tests (pull_request) Failing after 4m51s
CI Workflow / Prepare GO cache (pull_request) Successful in 6m12s
CI Workflow / Code coverage report (pull_request) Has been cancelled
CI Workflow / Test readiness for publishing provider (pull_request) Has been cancelled
CI Workflow / CI run tests (pull_request) Has been cancelled
CI Workflow / CI run build and linting (pull_request) Has been cancelled
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 6s
TF Acceptance Tests Workflow / Acceptance Tests (pull_request) Failing after 4m51s
CI Workflow / Prepare GO cache (pull_request) Successful in 6m12s
CI Workflow / Code coverage report (pull_request) Has been cancelled
CI Workflow / Test readiness for publishing provider (pull_request) Has been cancelled
CI Workflow / CI run tests (pull_request) Has been cancelled
CI Workflow / CI run build and linting (pull_request) Has been cancelled
This commit is contained in:
parent
042e8115a6
commit
746f7cdfbd
13 changed files with 1438 additions and 259 deletions
|
|
@ -163,16 +163,16 @@ func TestAccInstance(t *testing.T) {
|
|||
t, resource.TestCase{
|
||||
PreCheck: func() {
|
||||
testAccPreCheck(t)
|
||||
t.Logf(" ... working on instance %s", exData.TfName)
|
||||
t.Logf(" ... %s - %s", t.Name(), exData.TfName)
|
||||
},
|
||||
CheckDestroy: testAccCheckPostgresFlexDestroy,
|
||||
ProtoV6ProviderFactories: testutils.TestAccProtoV6ProviderFactories,
|
||||
Steps: []resource.TestStep{
|
||||
// Create and verify
|
||||
{
|
||||
//PreConfig: func() {
|
||||
// //
|
||||
// },
|
||||
PreConfig: func() {
|
||||
t.Logf("testing: %s - %s", t.Name(), "create and verify")
|
||||
},
|
||||
Config: testutils.StringFromTemplateMust(
|
||||
"testdata/instance_template.gompl",
|
||||
exData,
|
||||
|
|
@ -210,9 +210,9 @@ func TestAccInstance(t *testing.T) {
|
|||
},
|
||||
// Second apply should not have changes
|
||||
{
|
||||
//PreConfig: func() {
|
||||
// //
|
||||
// },
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "second apply")
|
||||
},
|
||||
Config: testutils.StringFromTemplateMust(
|
||||
"testdata/instance_template.gompl",
|
||||
exData,
|
||||
|
|
@ -236,10 +236,16 @@ func TestAccInstance(t *testing.T) {
|
|||
},
|
||||
// Refresh state test
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "refresh state")
|
||||
},
|
||||
RefreshState: true,
|
||||
},
|
||||
// Update name and verify
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "update name")
|
||||
},
|
||||
Config: testutils.StringFromTemplateMust(
|
||||
"testdata/instance_template.gompl",
|
||||
updNameData,
|
||||
|
|
@ -259,6 +265,9 @@ func TestAccInstance(t *testing.T) {
|
|||
},
|
||||
// Update size and verify
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "update storage.size")
|
||||
},
|
||||
Config: testutils.StringFromTemplateMust(
|
||||
"testdata/instance_template.gompl",
|
||||
updSizeData,
|
||||
|
|
@ -275,6 +284,9 @@ func TestAccInstance(t *testing.T) {
|
|||
},
|
||||
// Update backup schedule
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "update backup schedule")
|
||||
},
|
||||
Config: testutils.StringFromTemplateMust(
|
||||
"testdata/instance_template.gompl",
|
||||
updBackupSched,
|
||||
|
|
@ -291,6 +303,9 @@ func TestAccInstance(t *testing.T) {
|
|||
},
|
||||
// Update network ACL
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "update network.acl")
|
||||
},
|
||||
Config: testutils.StringFromTemplateMust(
|
||||
"testdata/instance_template.gompl",
|
||||
updNetACL,
|
||||
|
|
@ -307,6 +322,9 @@ func TestAccInstance(t *testing.T) {
|
|||
},
|
||||
// Update version
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "update version")
|
||||
},
|
||||
Config: testutils.StringFromTemplateMust(
|
||||
"testdata/instance_template.gompl",
|
||||
updVersion,
|
||||
|
|
@ -322,6 +340,9 @@ func TestAccInstance(t *testing.T) {
|
|||
// Import test
|
||||
// test instance imports
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "import instance")
|
||||
},
|
||||
ResourceName: testItemID,
|
||||
// ImportStateIdPrefix: "",
|
||||
// ImportStateVerifyIdentifierAttribute: "id",
|
||||
|
|
@ -346,13 +367,16 @@ func TestAccInstanceHA(t *testing.T) {
|
|||
t, resource.TestCase{
|
||||
PreCheck: func() {
|
||||
testAccPreCheck(t)
|
||||
t.Logf(" ... working on instance %s", data.TfName)
|
||||
t.Logf(" ... %s - %s", t.Name(), data.TfName)
|
||||
},
|
||||
CheckDestroy: testAccCheckPostgresFlexDestroy,
|
||||
ProtoV6ProviderFactories: testutils.TestAccProtoV6ProviderFactories,
|
||||
Steps: []resource.TestStep{
|
||||
// Create and verify
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "create and verify")
|
||||
},
|
||||
Config: testutils.StringFromTemplateMust(
|
||||
"testdata/instance_template.gompl",
|
||||
data,
|
||||
|
|
@ -384,13 +408,16 @@ func TestAccInstanceWithUsers(t *testing.T) {
|
|||
t, resource.TestCase{
|
||||
PreCheck: func() {
|
||||
testAccPreCheck(t)
|
||||
t.Logf(" ... working on instance %s", data.TfName)
|
||||
t.Logf(" ... %s - %s", t.Name(), data.TfName)
|
||||
},
|
||||
CheckDestroy: testAccCheckPostgresFlexDestroy,
|
||||
ProtoV6ProviderFactories: testutils.TestAccProtoV6ProviderFactories,
|
||||
Steps: []resource.TestStep{
|
||||
// Create and verify
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "create and verify")
|
||||
},
|
||||
Config: testutils.StringFromTemplateMust(
|
||||
"testdata/instance_template.gompl",
|
||||
data,
|
||||
|
|
@ -435,13 +462,16 @@ func TestAccInstanceWithDatabases(t *testing.T) {
|
|||
t, resource.TestCase{
|
||||
PreCheck: func() {
|
||||
testAccPreCheck(t)
|
||||
t.Logf(" ... working on instance %s", data.TfName)
|
||||
t.Logf(" ... %s - %s", t.Name(), data.TfName)
|
||||
},
|
||||
CheckDestroy: testAccCheckPostgresFlexDestroy,
|
||||
ProtoV6ProviderFactories: testutils.TestAccProtoV6ProviderFactories,
|
||||
Steps: []resource.TestStep{
|
||||
// Create and verify
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "create and verify")
|
||||
},
|
||||
Config: testutils.StringFromTemplateMust(
|
||||
"testdata/instance_template.gompl",
|
||||
data,
|
||||
|
|
@ -449,6 +479,7 @@ func TestAccInstanceWithDatabases(t *testing.T) {
|
|||
Check: resource.ComposeAggregateTestCheckFunc(
|
||||
defaultNoEncInstanceTestChecks(testItemID, data),
|
||||
|
||||
// TODO - extract also to functions
|
||||
resource.TestCheckResourceAttr(testutils.ResStr(pfx, "user", userName), "name", userName),
|
||||
resource.TestCheckResourceAttrSet(testutils.ResStr(pfx, "user", userName), "id"),
|
||||
resource.TestCheckResourceAttrPair(
|
||||
|
|
@ -460,6 +491,7 @@ func TestAccInstanceWithDatabases(t *testing.T) {
|
|||
testutils.ResStr(pfx, "user", userName), "instance_id",
|
||||
),
|
||||
|
||||
// TODO - extract also to functions
|
||||
resource.TestCheckResourceAttr(testutils.ResStr(pfx, "database", dbName), "name", dbName),
|
||||
resource.TestCheckResourceAttr(testutils.ResStr(pfx, "database", dbName), "owner", userName),
|
||||
resource.TestCheckResourceAttrSet(testutils.ResStr(pfx, "database", dbName), "id"),
|
||||
|
|
@ -475,6 +507,9 @@ func TestAccInstanceWithDatabases(t *testing.T) {
|
|||
},
|
||||
// data source
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "datasource")
|
||||
},
|
||||
Config: testutils.StringFromTemplateMust(
|
||||
"testdata/instance_template.gompl",
|
||||
data,
|
||||
|
|
@ -561,6 +596,9 @@ func TestAccInstanceWithDatabases(t *testing.T) {
|
|||
},
|
||||
// test instance imports
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "import instance")
|
||||
},
|
||||
ResourceName: testItemID,
|
||||
// ImportStateIdPrefix: "",
|
||||
ImportStateVerifyIdentifierAttribute: "id",
|
||||
|
|
@ -571,6 +609,9 @@ func TestAccInstanceWithDatabases(t *testing.T) {
|
|||
},
|
||||
// test database imports
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "import database")
|
||||
},
|
||||
ResourceName: testutils.ResStr(pfx, "database", dbName),
|
||||
// ImportStateIdPrefix: "",
|
||||
// ImportStateVerifyIdentifierAttribute: "id",
|
||||
|
|
@ -581,6 +622,9 @@ func TestAccInstanceWithDatabases(t *testing.T) {
|
|||
},
|
||||
// test user imports
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "import user")
|
||||
},
|
||||
ResourceName: testutils.ResStr(pfx, "user", userName),
|
||||
// ImportStateIdPrefix: "",
|
||||
// ImportStateVerifyIdentifierAttribute: "id",
|
||||
|
|
@ -653,13 +697,16 @@ func TestAccEncryptedInstanceWithDatabases(t *testing.T) {
|
|||
t, resource.TestCase{
|
||||
PreCheck: func() {
|
||||
testAccPreCheck(t)
|
||||
t.Logf(" ... working on instance %s", data.TfName)
|
||||
t.Logf(" ... %s - %s", t.Name(), data.TfName)
|
||||
},
|
||||
CheckDestroy: testAccCheckPostgresFlexDestroy,
|
||||
ProtoV6ProviderFactories: testutils.TestAccProtoV6ProviderFactories,
|
||||
Steps: []resource.TestStep{
|
||||
// Create and verify
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "create and verify")
|
||||
},
|
||||
Config: testutils.StringFromTemplateMust(
|
||||
"testdata/instance_template.gompl",
|
||||
data,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue