werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source4/torture/rpc/
[amitay/samba.git] / source4 / torture / rpc / wkssvc.c
index 09272004ef3dfe81af4fff4023a4ee53b9f718ac..e19523f172e78551ecd2f89611235e1dbfd32dd2 100644 (file)
@@ -129,7 +129,7 @@ static bool test_NetrWkstaTransportAdd(struct torture_context *tctx,
        torture_assert_ntstatus_ok(tctx, status,
                                   "NetrWkstaTransportAdd failed");
        torture_assert_werr_equal(tctx, r.out.result,
-                                 WERR_INVALID_PARAM,
+                                 WERR_INVALID_PARAMETER,
                                  "NetrWkstaTransportAdd level 0 failed");
 
        return true;
@@ -231,12 +231,12 @@ static bool test_NetrWkstaUserGetInfo(struct torture_context *tctx,
                { NULL, 0, WERR_NO_SUCH_LOGON_SESSION },
                { NULL, 1, WERR_NO_SUCH_LOGON_SESSION },
                { NULL, 1101, WERR_OK },
-               { dom, 0, WERR_INVALID_PARAM },
-               { dom, 1, WERR_INVALID_PARAM },
-               { dom, 1101, WERR_INVALID_PARAM },
-               { user, 0, WERR_INVALID_PARAM },
-               { user, 1, WERR_INVALID_PARAM },
-               { user, 1101, WERR_INVALID_PARAM },
+               { dom, 0, WERR_INVALID_PARAMETER },
+               { dom, 1, WERR_INVALID_PARAMETER },
+               { dom, 1101, WERR_INVALID_PARAMETER },
+               { user, 0, WERR_INVALID_PARAMETER },
+               { user, 1, WERR_INVALID_PARAMETER },
+               { user, 1101, WERR_INVALID_PARAMETER },
        };
 
        for (i=0; i<ARRAY_SIZE(tests); i++) {
@@ -346,7 +346,7 @@ static bool test_NetrUseAdd(struct torture_context *tctx,
        status = dcerpc_wkssvc_NetrUseAdd_r(b, tctx, &r);
        torture_assert_ntstatus_ok(tctx, status,
                                   "NetrUseAdd failed");
-       torture_assert_werr_equal(tctx, r.out.result, WERR_UNKNOWN_LEVEL,
+       torture_assert_werr_equal(tctx, r.out.result, WERR_INVALID_LEVEL,
                               "NetrUseAdd failed");
 
        ZERO_STRUCT(r);
@@ -476,7 +476,7 @@ static bool test_NetrUseGetInfo(struct torture_context *tctx,
 
                        if (!test_NetrUseGetInfo_level(tctx, p, use_name,
                                                       levels[i],
-                                                      WERR_NOT_CONNECTED))
+                                                      WERR_NERR_USENOTFOUND))
                        {
                                if (levels[i] != 0) {
                                        return false;
@@ -1204,7 +1204,7 @@ static bool test_NetrJoinDomain2(struct torture_context *tctx,
        struct dcerpc_binding_handle *b = p->binding_handle;
 
        /* FIXME: this test assumes to join workstations / servers and does not
-        * handle DCs (WERR_SETUP_DOMAIN_CONTROLLER) */
+        * handle DCs (WERR_NERR_SETUPDOMAINCONTROLLER) */
 
        if (!test_GetJoinInformation(tctx, p, &join_status, &join_name))
        {
@@ -1213,7 +1213,7 @@ static bool test_NetrJoinDomain2(struct torture_context *tctx,
 
        switch (join_status) {
                case NET_SETUP_DOMAIN_NAME:
-                       expected_err = WERR_SETUP_ALREADY_JOINED;
+                       expected_err = WERR_NERR_SETUPALREADYJOINED;
                        break;
                case NET_SETUP_UNKNOWN_STATUS:
                case NET_SETUP_UNJOINED:
@@ -1289,7 +1289,7 @@ static bool test_NetrUnjoinDomain2(struct torture_context *tctx,
        struct dcerpc_binding_handle *b = p->binding_handle;
 
        /* FIXME: this test assumes to join workstations / servers and does not
-        * handle DCs (WERR_SETUP_DOMAIN_CONTROLLER) */
+        * handle DCs (WERR_NERR_SETUPDOMAINCONTROLLER) */
 
        if (!test_GetJoinInformation(tctx, p, &join_status, &join_name))
        {
@@ -1298,7 +1298,7 @@ static bool test_NetrUnjoinDomain2(struct torture_context *tctx,
 
        switch (join_status) {
                case NET_SETUP_UNJOINED:
-                       expected_err = WERR_SETUP_NOT_JOINED;
+                       expected_err = WERR_NERR_SETUPNOTJOINED;
                        break;
                case NET_SETUP_DOMAIN_NAME:
                case NET_SETUP_UNKNOWN_STATUS: