fix: refactor tests
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 5s
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 3m27s
CI Workflow / CI run tests (pull_request) Failing after 4m54s
CI Workflow / CI run build and linting (pull_request) Failing after 4m39s
CI Workflow / Code coverage report (pull_request) Has been skipped

This commit is contained in:
Marcel S. Henselin 2026-03-09 11:03:29 +01:00
parent 826bb5b36a
commit c7260e04e2
19 changed files with 521 additions and 938 deletions

View file

@ -66,7 +66,7 @@ func Test_handleConnectionInfo(t *testing.T) {
ConnectionInfo: postgresflex.InstanceConnectionInfo{
Write: postgresflex.InstanceConnectionInfoWrite{
Host: tt.args.hostName,
Port: tt.args.port,
Port: int32(tt.args.port),
},
},
}
@ -93,7 +93,7 @@ func Test_handleConnectionInfo(t *testing.T) {
if !ok {
t.Errorf("could not find a value for port in connection_info.write")
}
if !gotPort.Equal(types.Int32Value(tt.args.port)) {
if !gotPort.Equal(types.Int64Value(int64(tt.args.port))) {
t.Errorf("port value incorrect: want: %d - got: %s", tt.args.port, gotPort.String())
}
}
@ -102,6 +102,7 @@ func Test_handleConnectionInfo(t *testing.T) {
}
func Test_handleEncryption(t *testing.T) {
t.Skipf("please implement")
type args struct {
m *dataSourceModel
resp *postgresflex.GetInstanceResponse
@ -121,6 +122,7 @@ func Test_handleEncryption(t *testing.T) {
}
func Test_handleNetwork(t *testing.T) {
t.Skipf("please implement")
type args struct {
ctx context.Context
m *dataSourceModel
@ -143,6 +145,7 @@ func Test_handleNetwork(t *testing.T) {
}
func Test_mapGetDataInstanceResponseToModel(t *testing.T) {
t.Skipf("please implement")
type args struct {
ctx context.Context
m *dataSourceModel
@ -165,6 +168,7 @@ func Test_mapGetDataInstanceResponseToModel(t *testing.T) {
}
func Test_mapGetInstanceResponseToModel(t *testing.T) {
t.Skipf("please implement")
type args struct {
ctx context.Context
m *postgresflexalpharesource.InstanceModel