-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c14dba5
commit 154563b
Showing
3 changed files
with
42 additions
and
6 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
35 changes: 35 additions & 0 deletions
35
flexibleengine/acceptance/data_source_flexibleengine_dms_maintainwindow_test.go
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,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 | ||
} | ||
` |
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