Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #29 from basho/sdc-freebsd-no-legacy

FreeBSD wasn't supported until 1.2, so won't upgrade from legacy until 1.4
  • Loading branch information...
commit b33d70b4f7983e75f59b7b8182d872cd8489b00c 2 parents 94b9498 + 58210b9
@seancribbs seancribbs authored
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.
-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
Please sign in to comment.
Something went wrong with that request. Please try again.