s4-test: yet another test for ATTID-ot-OID conversion
authorKamen Mazdrashki <kamenim@samba.org>
Mon, 20 Sep 2010 18:28:06 +0000 (21:28 +0300)
committerKamen Mazdrashki <kamenim@samba.org>
Mon, 20 Sep 2010 21:15:24 +0000 (00:15 +0300)
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

index a4521eb675d360252a46c65ce53a5ef6d793c3fd..a9543997719bb52e62b4a5082ff276a1d57717ff 100644 (file)
@@ -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);