Skip to content
This repository was archived by the owner on Oct 16, 2023. It is now read-only.
This repository was archived by the owner on Oct 16, 2023. It is now read-only.

Samples tests are failing with PermissionDenied #243

Closed
@parthea

Description

@parthea

The sample test for create_deny_policy is failing with PermissionDenied. See build log here and stack trace below:

create_deny_policy.py:103: in create_deny_policy
    result = policies_client.create_policy(request=request).result()
../../google/cloud/iam_v2/services/policies/client.py:787: in create_policy
    metadata=metadata,
.nox/py-3-7/lib/python3.7/site-packages/google/api_core/gapic_v1/method.py:154: in __call__
    return wrapped_func(*args, **kwargs)
.nox/py-3-7/lib/python3.7/site-packages/google/api_core/retry.py:288: in retry_wrapped_func
    on_error=on_error,
.nox/py-3-7/lib/python3.7/site-packages/google/api_core/retry.py:190: in retry_target
    return target()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (parent: "policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fpython-docs-samples-tests/denypolicies"
policy {
 ...eing deleted has a tag with the value test"
  }
}
policy_id: "test-deny-policy-e49f57dd-603b-48b5-bcde-fd81ab1d17f6"
,)
kwargs = {'metadata': [('x-goog-request-params', 'parent=policies/cloudresourcemanager.googleapis.com%252Fprojects%252Fpython-docs-samples-tests/denypolicies'), ('x-goog-api-client', 'gl-python/3.7.12 grpc/1.50.0 gax/2.10.2 gapic/2.8.2')]}

    @functools.wraps(callable_)
    def error_remapped_callable(*args, **kwargs):
        try:
            return callable_(*args, **kwargs)
        except grpc.RpcError as exc:
>           raise exceptions.from_grpc_error(exc) from exc
E           google.api_core.exceptions.PermissionDenied: 403 Permission iam.googleapis.com/denypolicies.create denied on resource cloudresourcemanager.googleapis.com/projects/python-docs-samples-tests

.nox/py-3-7/lib/python3.7/site-packages/google/api_core/grpc_helpers.py:74: PermissionDenied

Metadata

Metadata

Assignees

Labels

api: iamIssues related to the googleapis/python-iam API.priority: p2Moderately-important priority. Fix may not be included in next release.samplesIssues that are directly related to samples.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions