]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests: Allow alternative error code for backupkey test
authorGarming Sam <garming@catalyst.net.nz>
Tue, 12 Jul 2016 05:10:15 +0000 (17:10 +1200)
committerGarming Sam <garming@samba.org>
Tue, 12 Jul 2016 21:24:13 +0000 (23:24 +0200)
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/torture/rpc/backupkey_heimdal.c

index 32b023529e86ec7d57845a509f1a6f98d0221312..c0db48d58cfa297d028c121aa98537d26ff26cfe 100644 (file)
@@ -1939,10 +1939,12 @@ static bool test_ServerWrap_decrypt_wrong_stuff(struct torture_context *tctx,
                                          WERR_INVALID_ACCESS,
                                          "decrypt should fail with WERR_INVALID_ACCESS");
        } else {
-               torture_assert_werr_equal(tctx,
-                                         r.out.result,
-                                         WERR_INVALID_PARAM,
-                                         "decrypt should fail with WERR_INVALID_PARAM");
+               if (!W_ERROR_EQUAL(r.out.result, WERR_INVALID_PARAM)) {
+                       torture_assert_werr_equal(tctx,
+                                                 r.out.result,
+                                                 WERR_INVALID_ACCESS,
+                                                 "decrypt should fail with WERR_INVALID_ACCESS or WERR_INVALID_PARAM");
+               }
        }
 
        /* Decrypt */