Closed
Description
Hello!
We have "ORA-01031: insufficient privileges" in release v3.1.4 when using SYS_REFCURSOR in ut.expect. Example below.
create table test_table (id number);
CREATE OR REPLACE PACKAGE tp_test_grants IS
--%suite(Grants testing)
--%test(Test grants)
PROCEDURE test_test_grants;
end;
/
CREATE OR REPLACE PACKAGE BODY tp_test_grants IS
PROCEDURE test_test_grants IS
v_details_cur SYS_REFCURSOR;
BEGIN
OPEN v_details_cur FOR
SELECT * from test_table;
ut.expect(v_details_cur).not_to(be_empty);
END test_test_grants;
END tp_test_grants;
We run:
BEGIN
dbms_output.enable(1000000);
ut.run('tp_test_grants.test_test_grants');
rollback;
END;
Get error
Grants testing
Test grants [,009 sec] (FAILED - 1)
Failures:
- test_test_grants
ORA-01031: привилегий недостаточно
ORA-06512: на "UT3.UT_CURSOR_DETAILS", line 198
ORA-06512: на "UT3.UT_DATA_VALUE_REFCURSOR", line 114
ORA-06512: на "UT3.UT_DATA_VALUE", line 56
ORA-06512: на "UT3.UT_MATCHER", line 67
ORA-06512: на "UT3.UT_EXPECTATION", line 40
ORA-06512: на "INS.TP_TEST_GRANTS", line 11
ORA-06512: на "UT3.UT_CURSOR_DETAILS", line 198
ORA-06512: на "UT3.UT_DATA_VALUE_REFCURSOR", line 114
ORA-06512: на "UT3.UT_DATA_VALUE", line 56
ORA-06512: на "UT3.UT_MATCHER", line 67
ORA-06512: на "UT3.UT_EXPECTATION", line 40
ORA-06512: на "INS.TP_TEST_GRANTS", line 11
ORA-06512: на line 6
Finished in ,010221 seconds
1 tests, 0 failed, 1 errored, 0 disabled, 0 warning(s)