From 4752a6b6d7767a62f322ee3d8e3a412e7699fcea Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Mon, 20 Sep 2010 21:28:06 +0300 Subject: s4-test: yet another test for ATTID-ot-OID conversion Test with a valid ATTID for prefixMap lookups, but supplied ATTID is with index not to be found in the test prefixMap --- source4/torture/drs/unit/prefixmap_tests.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source4/torture/drs') diff --git a/source4/torture/drs/unit/prefixmap_tests.c b/source4/torture/drs/unit/prefixmap_tests.c index a4521eb675..a954399771 100644 --- a/source4/torture/drs/unit/prefixmap_tests.c +++ b/source4/torture/drs/unit/prefixmap_tests.c @@ -394,8 +394,13 @@ static bool torture_drs_unit_pfm_oid_from_attid_check_attid(struct torture_conte const char *oid; /* Test with valid prefixMap attid */ - werr = dsdb_schema_pfm_oid_from_attid(priv->pfm_full, 0x00000000, tctx, &oid); - torture_assert_werr_ok(tctx, werr, "Testing prefixMap type attid = 0x0000000"); + werr = dsdb_schema_pfm_oid_from_attid(priv->pfm_full, 0x00010001, tctx, &oid); + torture_assert_werr_ok(tctx, werr, "Testing prefixMap type attid = 0x00010001"); + + /* Test with valid attid but invalid index */ + werr = dsdb_schema_pfm_oid_from_attid(priv->pfm_full, 0x01110001, tctx, &oid); + torture_assert_werr_equal(tctx, werr, WERR_DS_NO_ATTRIBUTE_OR_VALUE, + "Testing invalid-index attid = 0x01110001"); /* Test with attid in msDS-IntId range */ werr = dsdb_schema_pfm_oid_from_attid(priv->pfm_full, 0x80000000, tctx, &oid); -- cgit