Reorder pipeline stages-related migrations
This commit is contained in:
parent
23c9349082
commit
ff61e2b776
5 changed files with 10 additions and 8 deletions
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170526190708) do
|
||||
ActiveRecord::Schema.define(version: 20170526190948) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
require Rails.root.join('db', 'post_migrate', '20170526101042_migrate_pipeline_stages.rb')
|
||||
require Rails.root.join('db', 'post_migrate', '20170526185842_migrate_pipeline_stages.rb')
|
||||
|
||||
describe MigratePipelineStages, :migration, schema: 20170525132202 do
|
||||
describe MigratePipelineStages, :migration, schema: 20170526185602 do
|
||||
##
|
||||
# Create test data - pipeline and CI/CD jobs.
|
||||
#
|
||||
|
|
|
@ -95,12 +95,14 @@ RSpec.configure do |config|
|
|||
end
|
||||
|
||||
config.around(:example, migration: true) do |example|
|
||||
schema_version = example.metadata.fetch(:schema)
|
||||
ActiveRecord::Migrator.migrate(migrations_paths, schema_version)
|
||||
begin
|
||||
schema_version = example.metadata.fetch(:schema)
|
||||
ActiveRecord::Migrator.migrate(migrations_paths, schema_version)
|
||||
|
||||
example.run
|
||||
|
||||
ActiveRecord::Migrator.migrate(migrations_paths)
|
||||
example.run
|
||||
ensure
|
||||
ActiveRecord::Migrator.migrate(migrations_paths)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue