fix: remove wrong config state check
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 24s
CI Workflow / Prepare GO cache (pull_request) Successful in 9m36s
CI Workflow / Test readiness for publishing provider (pull_request) Successful in 17m21s
CI Workflow / CI run build and linting (pull_request) Successful in 19m35s
CI Workflow / Code coverage report (pull_request) Successful in 8s
CI Workflow / CI run tests (pull_request) Successful in 27m35s
TF Acceptance Tests Workflow / Acceptance Tests (pull_request) Has been cancelled

This commit is contained in:
Marcel S. Henselin 2026-03-17 14:48:31 +01:00
parent ad9b719f5e
commit 4c5f392e40

View file

@ -8,7 +8,6 @@ import (
"log"
"net/http"
"os"
"regexp"
"strconv"
"strings"
"testing"
@ -174,25 +173,6 @@ func TestAccInstance(t *testing.T) {
tfjsonpath.New("is_deletable"),
knownvalue.Bool(true),
),
// TODO - correct
statecheck.ExpectKnownValue(
testInstanceID,
tfjsonpath.New("connection_info"),
knownvalue.MapExact(map[string]knownvalue.Check{
"write": knownvalue.MapExact(map[string]knownvalue.Check{
"host": knownvalue.StringRegexp(regexp.MustCompile("[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}.postgresql.[a-z0-9]+.onstackit.cloud")),
"port": knownvalue.Int32Func(func(v int32) error {
if v < 0 {
return fmt.Errorf("value is negative")
}
if v <= 1024 {
return fmt.Errorf("value uses protected port range")
}
return nil
}),
}),
}),
),
},
Check: defaultNoEncInstanceTestChecks(testInstanceID, exData),
},
@ -278,25 +258,6 @@ func TestAccInstanceReApply(t *testing.T) {
tfjsonpath.New("is_deletable"),
knownvalue.Bool(true),
),
// TODO - correct
statecheck.ExpectKnownValue(
testInstanceID,
tfjsonpath.New("connection_info"),
knownvalue.MapExact(map[string]knownvalue.Check{
"write": knownvalue.MapExact(map[string]knownvalue.Check{
"host": knownvalue.StringRegexp(regexp.MustCompile("[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}.postgresql.[a-z0-9]+.onstackit.cloud")),
"port": knownvalue.Int32Func(func(v int32) error {
if v < 0 {
return fmt.Errorf("value is negative")
}
if v <= 1024 {
return fmt.Errorf("value uses protected port range")
}
return nil
}),
}),
}),
),
},
Check: defaultNoEncInstanceTestChecks(testInstanceID, exData),
},