chore: add tests

[skip ci]
This commit is contained in:
Marcel S. Henselin 2026-03-25 16:53:23 +01:00
parent ff144042ba
commit b06e7ffd40
4 changed files with 56 additions and 2 deletions

View file

@ -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
{