summaryrefslogtreecommitdiff
path: root/test/integration/failure_test.rb
blob: ac84d05899d5195343978fe836de4a930db86fdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require_relative '../test_helper.rb'

class FailureTest < Tapicero::IntegrationTest

  def setup
  end

  def teardown
  end

  def test_couchdb_not_running_and_then_running_again
    TapiceroProcess.run_with_config('test/badconfig.yaml')
    create_user
    assert_raises RestClient::ResourceNotFound do
      user_database.info
    end
    TapiceroProcess.run_with_config('test/config.yaml')
    # it would be nice if we could signal tapicero to ask if it is idle.
    # instead, we wait.
    sleep 0.5
    assert_database_exists user_database
  end

end