Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unit Test Failure: insufficient privilege on testrange function in test_range #26

@setoru

Description

@setoru

Description:

When running tests/types/test_range.py as the root user, multiple tests fail with InsufficientPrivilege errors related to the testrange function. The error explicitly states:gaussdb.errors.InsufficientPrivilege: Must be owner of function testrange.

ERROR tests/types/test_range.py::test_fetch_info_async[asyncio-testrange-text] - gaussdb.errors.InsufficientPrivilege: Must be owner of function testrange.
...

Expected Behavior:

tests pass.

How to reproduce it:

pytest --durations=0 -s -v tests/types/test_range.py

Additional information:

The tests only succeed after explicitly changing the owner of the relevant functions:

ALTER FUNCTION testschema.testrange(double precision, double precision) OWNER TO root;
ALTER FUNCTION testschema.testrange(double precision, double precision, text) OWNER TO root;

ALTER FUNCTION public.testrange(text, text, text) OWNER TO root;
ALTER FUNCTION public.testrange(text, text) OWNER TO root;

Even as root, the default function ownership prevents the tests from running.

Environment:

  • OS: Huawei Cloud EulerOS 2.0
  • Database: GaussDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions