chore: add tests
[skip ci]
This commit is contained in:
parent
ff144042ba
commit
b06e7ffd40
4 changed files with 56 additions and 2 deletions
|
|
@ -157,6 +157,9 @@ func TestAccInstance(t *testing.T) {
|
|||
updVersion := updNetACL
|
||||
updVersion.Version = "17"
|
||||
|
||||
updRetention := updVersion
|
||||
updRetention.RetentionDays = 40
|
||||
|
||||
testItemID := testutils.ResStr(pfx, "instance", exData.TfName)
|
||||
compareValuesSame := statecheck.CompareValue(compare.ValuesSame())
|
||||
resource.ParallelTest(
|
||||
|
|
@ -337,6 +340,23 @@ func TestAccInstance(t *testing.T) {
|
|||
),
|
||||
),
|
||||
},
|
||||
// Update retention_days
|
||||
{
|
||||
PreConfig: func() {
|
||||
t.Logf(" ... %s - %s", t.Name(), "update version")
|
||||
},
|
||||
Config: testutils.StringFromTemplateMust(
|
||||
"testdata/instance_template.gompl",
|
||||
updVersion,
|
||||
),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
resource.TestCheckResourceAttr(
|
||||
testItemID,
|
||||
"retention_days",
|
||||
strconv.Itoa(int(updVersion.RetentionDays)),
|
||||
),
|
||||
),
|
||||
},
|
||||
// Import test
|
||||
// test instance imports
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue