Skip to content

Commit

Permalink
dms_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhukun-Huawei committed Nov 2, 2023
1 parent c14dba5 commit 154563b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 6 deletions.
12 changes: 6 additions & 6 deletions flexibleengine/acceptance/acceptance.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import (
)

var (
OS_DEPRECATED_ENVIRONMENT = os.Getenv("OS_DEPRECATED_ENVIRONMENT")
OS_AVAILABILITY_ZONE = os.Getenv("OS_AVAILABILITY_ZONE")
OS_REGION_NAME = os.Getenv("OS_REGION_NAME")
OS_ACCESS_KEY = os.Getenv("OS_ACCESS_KEY")
OS_SECRET_KEY = os.Getenv("OS_SECRET_KEY")
OS_PROJECT_ID = os.Getenv("OS_PROJECT_ID")
OS_DEPRECATED_ENVIRONMENT = os.Getenv("OS_DEPRECATED_ENVIRONMENT")
OS_AVAILABILITY_ZONE = os.Getenv("OS_AVAILABILITY_ZONE")
OS_REGION_NAME = os.Getenv("OS_REGION_NAME")
OS_ACCESS_KEY = os.Getenv("OS_ACCESS_KEY")
OS_SECRET_KEY = os.Getenv("OS_SECRET_KEY")
OS_PROJECT_ID = os.Getenv("OS_PROJECT_ID")

OS_VPC_ID = os.Getenv("OS_VPC_ID")
OS_NETWORK_ID = os.Getenv("OS_NETWORK_ID")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package acceptance

import (
"testing"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"

"github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance"
)

func TestAccDmsMaintainWindowDataSource_basic(t *testing.T) {
dataSourceName := "data.flexibleengine_dms_maintainwindow.maintainwindow1"
dc := acceptance.InitDataSourceCheck(dataSourceName)

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProviderFactories: TestAccProviderFactories,
Steps: []resource.TestStep{
{
Config: testAccDmsMaintainWindowDataSource_basic,
Check: resource.ComposeTestCheckFunc(
dc.CheckResourceExists(),
resource.TestCheckResourceAttr(dataSourceName, "seq", "1"),
resource.TestCheckResourceAttr(dataSourceName, "begin", "22:00:00"),
),
},
},
})
}

var testAccDmsMaintainWindowDataSource_basic = `
data "flexibleengine_dms_maintainwindow" "maintainwindow1" {
seq = 1
}
`
1 change: 1 addition & 0 deletions flexibleengine/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ func Provider() *schema.Provider {
"flexibleengine_dms_kafka_instances": dms.DataSourceDmsKafkaInstances(),
"flexibleengine_dms_rocketmq_broker": dms.DataSourceDmsRocketMQBroker(),
"flexibleengine_dms_rocketmq_instances": dms.DataSourceDmsRocketMQInstances(),
"flexibleengine_dms_maintainwindow": dms.DataSourceDmsMaintainWindow(),

"flexibleengine_dws_flavors": dws.DataSourceDwsFlavors(),
"flexibleengine_elb_certificate": elb.DataSourceELBCertificateV3(),
Expand Down

0 comments on commit 154563b

Please sign in to comment.