fix linting in cli/source/stub/stub_test.go (#5972)

https://github.com/hasura/graphql-engine/pull/5972
This commit is contained in:
Vladyslav Nekriach 2020-10-29 03:42:05 -02:00 committed by GitHub
parent c5ca59208e
commit 989832cfb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,16 +17,46 @@ func Test(t *testing.T) {
}
m := source.NewMigrations()
m.Append(&source.Migration{Version: 1, Direction: source.Up})
m.Append(&source.Migration{Version: 1, Direction: source.Down})
m.Append(&source.Migration{Version: 1, Direction: source.MetaUp})
m.Append(&source.Migration{Version: 1, Direction: source.MetaDown})
m.Append(&source.Migration{Version: 3, Direction: source.Up})
m.Append(&source.Migration{Version: 4, Direction: source.MetaUp})
m.Append(&source.Migration{Version: 5, Direction: source.Down})
m.Append(&source.Migration{Version: 6, Direction: source.MetaDown})
m.Append(&source.Migration{Version: 8, Direction: source.Up})
m.Append(&source.Migration{Version: 8, Direction: source.Down})
err = m.Append(&source.Migration{Version: 1, Direction: source.Up})
if err != nil {
t.Fatal(err)
}
err = m.Append(&source.Migration{Version: 1, Direction: source.Down})
if err != nil {
t.Fatal(err)
}
err = m.Append(&source.Migration{Version: 1, Direction: source.MetaUp})
if err != nil {
t.Fatal(err)
}
err = m.Append(&source.Migration{Version: 1, Direction: source.MetaDown})
if err != nil {
t.Fatal(err)
}
err = m.Append(&source.Migration{Version: 3, Direction: source.Up})
if err != nil {
t.Fatal(err)
}
err = m.Append(&source.Migration{Version: 4, Direction: source.MetaUp})
if err != nil {
t.Fatal(err)
}
err = m.Append(&source.Migration{Version: 5, Direction: source.Down})
if err != nil {
t.Fatal(err)
}
err = m.Append(&source.Migration{Version: 6, Direction: source.MetaDown})
if err != nil {
t.Fatal(err)
}
err = m.Append(&source.Migration{Version: 8, Direction: source.Up})
if err != nil {
t.Fatal(err)
}
err = m.Append(&source.Migration{Version: 8, Direction: source.Down})
if err != nil {
t.Fatal(err)
}
d.(*Stub).Migrations = m