Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting "ORA-01031: insufficient privileges" in release v3.1.4 when using SYS_REFCURSOR #864

Closed
Mikhail5544 opened this Issue Mar 20, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@Mikhail5544
Copy link

commented Mar 20, 2019

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:

  1. 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)
@jgebal

This comment has been minimized.

Copy link
Member

commented 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

This comment has been minimized.

Copy link
Member

commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.