You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Getting "ORA-01031: insufficient privileges" in release v3.1.4 when using SYS_REFCURSOR #864
We have "ORA-01031: insufficient privileges" in release v3.1.4 when using SYS_REFCURSOR in ut.expect. Example below.
createtabletest_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)
@Mikhail5544
Thanks again for finding and reporting this bug so quickly.
We're working on a testing strategy that will prevent such bugs in the future.
Release v3.1.5 is resolving the issue you've faced.
Activity
jgebal commentedon Mar 20, 2019
Hi @Mikhail5544
Thanks for reporting this so quickly/
We're currently investigating why this error sneaked through our tests.
Will keep you notified.
jgebal commentedon Mar 20, 2019
@Mikhail5544
Thanks again for finding and reporting this bug so quickly.
We're working on a testing strategy that will prevent such bugs in the future.
Release v3.1.5 is resolving the issue you've faced.