1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/lib/ldb/tests
Lukas Slebodnik 7a7a5ccf50 ldb: The test api.py should not rely on order of entries in dict
Test failed on s390x but there is a simple reproducer for any
architecture.

The built-in function repr returns the canonical string representation
of the object. We needn't care about order attributes in string
representation. Therefore test should pass for any order.

    for i in {1..30}; do
        PYTHONHASHSEED=random \
        python2 -c 'import ldb; msg = ldb.Message(); msg.dn = ldb.Dn(ldb.Ldb(), "dc=foo29"); msg["dc"] = b"foo"; print(repr(msg)) '
    done

  ======================================================================
  FAIL: test_repr (__main__.LdbMsgTests)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "tests/python/api.py", line 2322, in test_repr
      "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])})")
  AssertionError: "Message({'dc': MessageElement(['foo']), 'dn': Dn('dc=foo29')})" != "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])})"
  ----------------------------------------------------------------------
  Ran 1025 tests in 29.146s
  FAILED (failures=1)

Signed-off-by: Lukas Slebodnik <lslebodn@fedoraproject.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-01-29 22:09:07 +01:00
..
python ldb: The test api.py should not rely on order of entries in dict 2019-01-29 22:09:07 +01:00
schema-tests
init_slapd.sh
init.ldif
kill_slapd.sh
ldapi_url.sh
ldb_kv_ops_test.c lib: ldb: Remove use of talloc_autofree_context(). 2018-11-06 07:16:15 +01:00
ldb_lmdb_size_test.c ldb_mdb/tests: Add tests to check for max key length and DB size 2018-05-23 02:27:11 +02:00
ldb_lmdb_test.c lib ldb: move key value code to lib/ldb/ldb_key_value 2018-07-30 14:31:54 +02:00
ldb_mod_op_test.c Fix uClibc build on 64bit platforms by including stdint.h 2018-08-24 17:22:09 +02:00
ldb_msg.c Fix uClibc build on 64bit platforms by including stdint.h 2018-08-24 17:22:09 +02:00
ldb_tdb_test.c lib ldb: move key value code to lib/ldb/ldb_key_value 2018-07-30 14:31:54 +02:00
photo.ldif
samba4.png
sample_module.c ldb:tests/sample_module: don't be lazy and use ldb_msg_copy_shallow/ldb_build_add_req 2015-03-20 20:43:12 +01:00
slapd.conf
start_slapd.sh
test_ldb_dn.c ldb: Add new function ldb_dn_add_child_val() 2018-08-15 07:08:24 +02:00
test_ldb_qsort.c ldb: Add test for ldb_qsort() 2018-04-03 20:20:10 +02:00
test-attribs.ldif
test-config.ldif
test-controls.sh
test-default-config.ldif
test-dup-2.ldif
test-dup.ldif
test-extended.sh
test-generic.sh LDB:test-generic.sh - fix smaller/greater comparison tests 2017-12-19 03:09:12 +01:00
test-index.ldif
test-ldap.sh
test-modify-modrdn.ldif
test-modify-unmet-2.ldif
test-modify-unmet.ldif
test-modify.ldif
test-schema.sh
test-soloading.sh
test-sqlite3.sh
test-tdb-features.sh ldb: Add test for behaviour of rdn_name 2016-12-01 05:54:23 +01:00
test-tdb-subunit.sh
test-tdb.sh ldb: Run the Python testsuite 2015-11-05 18:04:23 +01:00
test-wildcard.ldif
test-wrong_attributes.ldif
test.ldif
testdata.txt
testsearch.txt