Skip to content

Commit

Permalink
Fixed unit test compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
noctarius committed Jul 21, 2023
1 parent 8dbd436 commit 5fbfb20
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 8 additions & 8 deletions internal/tests/datatype_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
stdctx "context"
"fmt"
"github.com/jackc/pgx/v5/pgtype"
"github.com/noctarius/timescaledb-event-streamer/internal/pgdecoding"
"github.com/noctarius/timescaledb-event-streamer/internal/supporting"
inttest "github.com/noctarius/timescaledb-event-streamer/internal/testing"
"github.com/noctarius/timescaledb-event-streamer/internal/testing/testrunner"
"github.com/noctarius/timescaledb-event-streamer/spi/pgtypes/datatypes"
"github.com/noctarius/timescaledb-event-streamer/spi/schema"
"github.com/noctarius/timescaledb-event-streamer/spi/schema/schemamodel"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -247,7 +247,7 @@ var dataTypeTable = []DataTypeTest{
},
{
name: "MAC Address (EUI-64)",
oid: datatypes.MacAddr8OID,
oid: pgdecoding.MacAddr8OID,
pgTypeName: "macaddr8",
schemaType: schemamodel.STRING,
value: "08:00:2B:01:02:03:04:05",
Expand All @@ -256,7 +256,7 @@ var dataTypeTable = []DataTypeTest{
},
{
name: "MAC Address (EUI-64) Array",
oid: datatypes.MacAddrArray8OID,
oid: pgdecoding.MacAddrArray8OID,
pgTypeName: "macaddr8[]",
schemaType: schemamodel.ARRAY,
elementSchemaType: schemamodel.STRING,
Expand Down Expand Up @@ -336,7 +336,7 @@ var dataTypeTable = []DataTypeTest{
},
{
name: "Time With Timezone",
oid: datatypes.TimeTZOID,
oid: pgdecoding.TimeTZOID,
pgTypeName: "timetz",
schemaType: schemamodel.STRING,
value: "12:00:12.054321Z07:30",
Expand All @@ -345,7 +345,7 @@ var dataTypeTable = []DataTypeTest{
},
{
name: "Time With Timezone Array",
oid: datatypes.TimeTZArrayOID,
oid: pgdecoding.TimeTZArrayOID,
pgTypeName: "timetz[]",
schemaType: schemamodel.ARRAY,
elementSchemaType: schemamodel.STRING,
Expand Down Expand Up @@ -588,7 +588,7 @@ var dataTypeTable = []DataTypeTest{
},
{
name: "Quoted Char Array",
oid: datatypes.QCharArrayOID,
oid: pgdecoding.QCharArrayOID,
pgTypeName: "\"char\"[]",
columnNameOverride: "qchar[]",
schemaType: schemamodel.ARRAY,
Expand Down Expand Up @@ -897,15 +897,15 @@ var dataTypeTable = []DataTypeTest{
},
{
name: "Xml",
oid: datatypes.XmlOID,
oid: pgdecoding.XmlOID,
pgTypeName: "xml",
schemaType: schemamodel.STRING,
value: "<test><simple>foo</simple></test>",
expected: quickCheckValue[string],
},
{
name: "Xml Array",
oid: datatypes.XmlArrayOID,
oid: pgdecoding.XmlArrayOID,
pgTypeName: "xml[]",
schemaType: schemamodel.ARRAY,
elementSchemaType: schemamodel.STRING,
Expand Down
4 changes: 4 additions & 0 deletions spi/systemcatalog/hypertable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ func (t *testPgType) SchemaBuilder() schemamodel.SchemaBuilder {
return nil
}

func (t *testPgType) Format() string {
return ""
}

func (t *testPgType) Equal(_ PgType) bool {
return true
}

0 comments on commit 5fbfb20

Please sign in to comment.