Skip to content

Commit

Permalink
PYCBC-385: Add test to test enabling error map
Browse files Browse the repository at this point in the history
Add test to prove it’s possible to enable error map.
Invalid connection string args cause an error when connecting.

Change-Id: I04863cc22e002e5abb0c6e701de3aaea91077b77
Reviewed-on: http://review.couchbase.org/81182
Tested-by: Mike Goldsmith <goldsmith.mike@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  • Loading branch information
MikeGoldsmith committed Jul 20, 2017
1 parent 1f43738 commit 238dee3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions couchbase/tests/cases/connection_t.py
Expand Up @@ -114,5 +114,11 @@ def test_multi_hosts(self):
cb = self.factory(str(cs))
self.assertTrue(cb.upsert("foo", "bar").success)

def test_enable_error_map(self):
# enabled via connection string param, invalid params cause error
conn_str = 'http://{0}:{1}?enable_errmap=true'.format(self.cluster_info.host, self.cluster_info.port)
cb = self.factory(conn_str)
self.assertTrue(cb.upsert("foo", "bar").success)

if __name__ == '__main__':
unittest.main()

0 comments on commit 238dee3

Please sign in to comment.