Skip to content

Instantly share code, notes, and snippets.

@andreacampi
Created November 30, 2012 12:40
Show Gist options
  • Save andreacampi/4175530 to your computer and use it in GitHub Desktop.
Save andreacampi/4175530 to your computer and use it in GitHub Desktop.
ClusterTest
require 'chef-workflow/helper'
class ClusterTest < MiniTest::Unit::VagrantTestCase
def setup
provision('cluster-db', 2)
provision('cluster-app', 2, ['cluster-db'])
end
def teardown
# deprovision('cluster-app')
# deprovision('cluster-db')
end
def test_we_have_two_app_servers
wait_for('cluster-app')
assert_search_count(:node, 'roles:cluster-app', 2)
end
def test_we_have_two_db_servers
wait_for('cluster-db')
assert_search_count(:node, 'roles:cluster-db', 2)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment