crypt32/tests: Skip test if we don't have enough rights.
This commit is contained in:
parent
cf111099fc
commit
0653b95017
|
@ -66,9 +66,17 @@ static void test_AddRemoveProvider(void)
|
||||||
/* nonexistent provider should result in a registry error */
|
/* nonexistent provider should result in a registry error */
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = CryptSIPRemoveProvider(&actionid);
|
ret = CryptSIPRemoveProvider(&actionid);
|
||||||
ok (!ret, "Expected CryptSIPRemoveProvider to fail.\n");
|
if (!ret && GetLastError() == ERROR_ACCESS_DENIED)
|
||||||
ok (GetLastError() == ERROR_FILE_NOT_FOUND,
|
{
|
||||||
"Expected ERROR_FILE_NOT_FOUND, got %d.\n", GetLastError());
|
/* Apparently the needed rights are checked before the existence of the provider */
|
||||||
|
skip("Need admin rights\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ok (!ret, "Expected CryptSIPRemoveProvider to fail.\n");
|
||||||
|
ok (GetLastError() == ERROR_FILE_NOT_FOUND,
|
||||||
|
"Expected ERROR_FILE_NOT_FOUND, got %d.\n", GetLastError());
|
||||||
|
}
|
||||||
|
|
||||||
/* Everything OK, pwszIsFunctionName and pwszIsFunctionNameFmt2 are left NULL
|
/* Everything OK, pwszIsFunctionName and pwszIsFunctionNameFmt2 are left NULL
|
||||||
* as allowed */
|
* as allowed */
|
||||||
|
|
Loading…
Reference in New Issue