lint: fix lll and imports
This commit is contained in:
parent
229f41e478
commit
75b7662c34
@ -4,12 +4,13 @@ import (
|
||||
"slices"
|
||||
"testing"
|
||||
|
||||
"git.offline-twitter.com/offline-labs/gas-stack/pkg/db"
|
||||
"git.offline-twitter.com/offline-labs/gas-stack/pkg/flowutils"
|
||||
"git.offline-twitter.com/offline-labs/gas-stack/pkg/schema"
|
||||
"github.com/go-test/deep"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"git.offline-twitter.com/offline-labs/gas-stack/pkg/db"
|
||||
"git.offline-twitter.com/offline-labs/gas-stack/pkg/flowutils"
|
||||
"git.offline-twitter.com/offline-labs/gas-stack/pkg/schema"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -146,8 +147,14 @@ func TestIncorrectMigrations(t *testing.T) {
|
||||
|
||||
// Has the right column, but it's the wrong type
|
||||
assert.Len(t, db1Schema.Tables["t1"].Columns, len(db2Schema.Tables["t1"].Columns))
|
||||
col1 := db1Schema.Tables["t1"].Columns[slices.IndexFunc(db1Schema.Tables["t1"].Columns, func(c schema.Column) bool { return c.Name == "data3" })]
|
||||
col2 := db2Schema.Tables["t1"].Columns[slices.IndexFunc(db2Schema.Tables["t1"].Columns, func(c schema.Column) bool { return c.Name == "data3" })]
|
||||
col1 := db1Schema.Tables["t1"].Columns[slices.IndexFunc(
|
||||
db1Schema.Tables["t1"].Columns,
|
||||
func(c schema.Column) bool { return c.Name == "data3" },
|
||||
)]
|
||||
col2 := db2Schema.Tables["t1"].Columns[slices.IndexFunc(
|
||||
db2Schema.Tables["t1"].Columns,
|
||||
func(c schema.Column) bool { return c.Name == "data3" },
|
||||
)]
|
||||
|
||||
assert.NotEqual(t, col1, col2)
|
||||
assert.Equal(t, col1.Type, "integer") // Full schema has an integer column
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user