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

Method TestHttpFileSystemMigrate

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

Source from the content-addressed store, hash-verified

131}
132
133func (s *SqliteMigrateSuite) TestHttpFileSystemMigrate(c *C) {
134 migrations := &HttpFileSystemMigrationSource{
135 FileSystem: http.Dir("test-migrations"),
136 }
137
138 // Executes two migrations
139 n, err := Exec(s.Db, "sqlite3", migrations, Up)
140 c.Assert(err, IsNil)
141 c.Assert(n, Equals, 2)
142
143 // Has data
144 id, err := s.DbMap.SelectInt("SELECT id FROM people")
145 c.Assert(err, IsNil)
146 c.Assert(id, Equals, int64(1))
147}
148
149func (s *SqliteMigrateSuite) TestAssetMigrate(c *C) {
150 migrations := &AssetMigrationSource{

Callers

nothing calls this directly

Calls 1

ExecFunction · 0.85

Tested by

no test coverage detected