summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2015-03-23 09:43:41 +1100
committerAlex Gorrod <alexander.gorrod@mongodb.com>2015-03-23 09:43:41 +1100
commitdd7b91b5d05387e4be93c2d3c19ea11ba36a6853 (patch)
tree831adb1d50f13307e3e32548452bbc9376ba79e6 /test
parent82b2f1634f1ca68fbd9701569b3adaf2c6f3d6d5 (diff)
parente492e12bb55a5f3878b20df0bb3a92aeb842bfd4 (diff)
downloadmongo-dd7b91b5d05387e4be93c2d3c19ea11ba36a6853.tar.gz
Merge pull request #1793 from wiredtiger/additional-config-checks
Additional config checks
Diffstat (limited to 'test')
-rw-r--r--test/suite/test_bug012.py70
1 files changed, 70 insertions, 0 deletions
diff --git a/test/suite/test_bug012.py b/test/suite/test_bug012.py
new file mode 100644
index 00000000000..5621e91ac30
--- /dev/null
+++ b/test/suite/test_bug012.py
@@ -0,0 +1,70 @@
+#!usr/bin/env python
+#
+# Public Domain 2014-2015 MongoDB, Inc.
+# Public Domain 2008-2014 WiredTiger, Inc.
+#
+# This is free and unencumbered software released into the public domain.
+#
+# Anyone is free to copy, modify, publish, use, compile, sell, or
+# distribute this software, either in source code form or as a compiled
+# binary, for any purpose, commercial or non-commercial, and by any
+# means.
+#
+# In jurisdictions that recognize copyright laws, the author or authors
+# of this software dedicate any and all copyright interest in the
+# software to the public domain. We make this dedication for the benefit
+# of the public at large and to the detriment of our heirs and
+# successors. We intend this dedication to be an overt act of
+# relinquishment in perpetuity of all present and future rights to this
+# software under copyright law.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+
+import wiredtiger, wttest
+
+# test_bug012.py
+class test_bug012(wttest.WiredTigerTestCase):
+
+ # Test that we detect illegal collators.
+ def test_illegal_collator(self):
+ msg = '/unknown collator/'
+ self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
+ lambda: self.session.create('table:A',
+ 'type=lsm,lsm=(bloom_config=(collator="xyzzy"))'), msg)
+
+ # Test that we detect illegal key formats.
+ def test_illegal_key_format(self):
+ msg = '/Invalid type/'
+ self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
+ lambda: self.session.create('table:A',
+ 'type=lsm,lsm=(bloom_config=(key_format="xyzzy"))'), msg)
+
+ # Test that we detect illegal value formats.
+ def test_illegal_value_format(self):
+ msg = '/Invalid type/'
+ self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
+ lambda: self.session.create('table:A',
+ 'type=lsm,lsm=(bloom_config=(value_format="xyzzy"))'), msg)
+
+ # Test that we detect illegal compressors.
+ def test_illegal_compressor(self):
+ msg = '/unknown compressor/'
+ self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
+ lambda: self.session.create('table:A',
+ 'type=lsm,lsm=(bloom_config=(block_compressor="xyzzy"))'), msg)
+
+ # Test that we detect illegal extractors.
+ def test_illegal_extractor(self):
+ msg = '/unknown extractor/'
+ self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
+ lambda: self.session.create('table:A',
+ 'type=lsm,lsm=(bloom_config=(extractor="xyzzy"))'), msg)
+
+if __name__ == '__main__':
+ wttest.run()