Skip to content

Commit

Permalink
Fixing testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
arjen-ag5 committed Sep 20, 2024
1 parent f9368c0 commit a5e5a8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/postgres/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,12 +602,12 @@ func TestGeneratedAllTypesSQLBuilderFiles(t *testing.T) {

testutils.AssertFileNamesEqual(t, modelDir, "all_types.go", "all_types_view.go", "employee.go", "link.go",
"mood.go", "person.go", "person_phone.go", "weird_names_table.go", "level.go", "user.go", "floats.go", "people.go",
"components.go", "vulnerabilities.go", "all_types_materialized_view.go", "sample_ranges.go")
"components.go", "vulnerabilities.go", "all_types_materialized_view.go", "sample_ranges.go", "sample_arrays.go")
testutils.AssertFileContent(t, modelDir+"/all_types.go", allTypesModelContent)

testutils.AssertFileNamesEqual(t, tableDir, "all_types.go", "employee.go", "link.go",
"person.go", "person_phone.go", "weird_names_table.go", "user.go", "floats.go", "people.go", "table_use_schema.go",
"components.go", "vulnerabilities.go", "sample_ranges.go")
"components.go", "vulnerabilities.go", "sample_ranges.go", "sample_arrays.go")
testutils.AssertFileContent(t, tableDir+"/all_types.go", allTypesTableContent)
testutils.AssertFileContent(t, tableDir+"/sample_ranges.go", sampleRangeTableContent)

Expand Down
5 changes: 2 additions & 3 deletions tests/postgres/scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,6 @@ func TestScanIntoCustomBaseTypes(t *testing.T) {
type MyFloat32 float32
type MyFloat64 float64
type MyString string
type MyStringArray pq.StringArray
type MyTime = time.Time

type film struct {
Expand All @@ -969,13 +968,13 @@ func TestScanIntoCustomBaseTypes(t *testing.T) {
ReplacementCost MyFloat64
Rating *model.MpaaRating
LastUpdate MyTime
SpecialFeatures MyStringArray
SpecialFeatures pq.StringArray
Fulltext MyString
}

// We'll skip special features, because it's a slice and it does not implement sql.Scanner
stmt := SELECT(
Film.AllColumns.Except(Film.SpecialFeatures),
Film.AllColumns,
).FROM(
Film,
).ORDER_BY(
Expand Down

0 comments on commit a5e5a8a

Please sign in to comment.