Commit graph

8 commits

Author SHA1 Message Date
Lin Jen-Shin
82f18eabf3 Reset all connection schema cache after migration tests
We might also want to consider reduce the number of
connections in the tests. However I just tried setting it to 1
and that doesn't seem enough for feature tests.
2017-09-12 02:49:32 +08:00
Grzegorz Bizon
db4bd1a67d Clear schema cache after running tests for migrations 2017-08-28 12:49:43 +02:00
Grzegorz Bizon
3a29646d73 Disable migrations output in migrations helpers 2017-08-17 12:34:31 +02:00
Grzegorz Bizon
c76f8f3e8f Make it possible to provide schema version in tests 2017-08-16 13:05:18 +02:00
Lin Jen-Shin
4d7c072da3 Reset only migration models
So that we could make sure migration tests could run even if
geo is not setup in EE.

This is because we have a model like this:

``` ruby
class Geo::BaseRegistry < ActiveRecord::Base
  def self.connection
    raise 'Geo secondary database is not configured' unless Gitlab::Geo.geo_database_configured?

    super
  end
end
```
2017-08-07 21:20:26 +08:00
Grzegorz Bizon
028423c2f5 Calculate previous migration version in specs support
This makes it possible to test migration on the schema this migration
was written for, without a need to specify a previous schema version
manually.
2017-06-05 11:07:10 +02:00
Grzegorz Bizon
918ababba6 Add pipeline stages post deployment migration 2017-05-26 14:46:45 +02:00
Grzegorz Bizon
0f9fbae78a Add migrations helpers to simplify writing migration specs 2017-05-26 10:36:01 +02:00