MCPcopy
hub / github.com/rubenv/sql-migrate / TestAssetMigrate

Method TestAssetMigrate

migrate_test.go:149–165  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

147}
148
149func (s *SqliteMigrateSuite) TestAssetMigrate(c *C) {
150 migrations := &AssetMigrationSource{
151 Asset: Asset,
152 AssetDir: AssetDir,
153 Dir: "test-migrations",
154 }
155
156 // Executes two migrations
157 n, err := Exec(s.Db, "sqlite3", migrations, Up)
158 c.Assert(err, IsNil)
159 c.Assert(n, Equals, 2)
160
161 // Has data
162 id, err := s.DbMap.SelectInt("SELECT id FROM people")
163 c.Assert(err, IsNil)
164 c.Assert(id, Equals, int64(1))
165}
166
167func (s *SqliteMigrateSuite) TestMigrateMax(c *C) {
168 migrations := &FileMigrationSource{

Callers

nothing calls this directly

Calls 1

ExecFunction · 0.85

Tested by

no test coverage detected