Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

FreeBSD wasn't supported until 1.2, so won't upgrade from legacy until 1.4 #29

Merged
merged 1 commit into from

3 participants

@joedevivo joedevivo commented on the diff
db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.

Well done, sir!

@cmeiklejohn Collaborator

:+1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@seancribbs seancribbs merged commit b33d70b into master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 4, 2012
This page is out of date. Refresh to see the latest.
View
25 db/migrate/2012120414431354653820_freebsd_14_legacy_min.rb
@@ -0,0 +1,25 @@
+class Freebsd14LegacyMin < ActiveRecord::Migration
+ def up
+ say_with_time "Setting min_version on freebsd legacy upgrade tests to 1.4.0" do
+ Test.where(:name => %w{verify_basic_upgrade loaded_upgrade}).
+ where(['tests.tags::hstore @> ?',
+ HstoreSerializer.dump('platform' => 'freebsd-9-64',
+ 'upgrade_version' => 'legacy')]).each do |test|
+ test.tags['min_version'] = '1.4.0'
+ test.save!
+ end
+ end
+ end
+
+ def down
+ say_with_time "Removing min_version on freebsd legacy upgrade tests" do
+ Test.where(:name => %w{verify_basic_upgrade loaded_upgrade}).
+ where(['tests.tags::hstore @> ?',
+ HstoreSerializer.dump('platform' => 'freebsd-9-64',
+ 'upgrade_version' => 'legacy')]).each do |test|
+ test.tags.delete('min_version')
+ test.save!
+ end
+ end
+ end
+end
View
2  db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.

Well done, sir!

@cmeiklejohn Collaborator

:+1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
-ActiveRecord::Schema.define(:version => 2012111614451353095159) do
+ActiveRecord::Schema.define(:version => 2012120414431354653820) do
create_table "projects", :force => true do |t|
t.string "name"
View
8 db/seed.rb
@@ -83,10 +83,14 @@ def create_riak_test(name, *args)
## Test upgrades on only persistent backends, from two different versions
platforms.each do |p|
%w{previous legacy}.each do |v|
+ # FreeBSD was not supported before 1.2, so don't run legacy
+ # upgrades until 1.4
+ tags = (p =~ /freebsd/ && v == 'legacy') ? {'min_version' => '1.4.0'} : {}
+
%w{bitcask eleveldb}.each do |b|
- create_riak_test "loaded_upgrade", 'platform' => p, 'backend' => b, 'upgrade_version' => v
+ create_riak_test "loaded_upgrade", tags.merge('platform' => p, 'backend' => b, 'upgrade_version' => v)
end
- create_riak_test "verify_basic_upgrade", 'platform' => p, 'upgrade_version' => v
+ create_riak_test "verify_basic_upgrade", tags.merge('platform' => p, 'upgrade_version' => v)
end
end
Something went wrong with that request. Please try again.