Skip to content

[iap] Debug why iap test doesn't pass locally. #3878

Closed

Description

@tmatsuo

If you run iap/iap_test.py locally, it fails with the following logs:
I'm not sure why. Maybe there're some firewall rules on the project?
I don't have access to the project gcp-devrel-iap-reflect right now, so it's hard to debug further. I'm trying to obtain the ownership of that project.

iap_test.py::test_main FAILED                                                                                                                               [100%]

============================================================================ FAILURES =============================================================================
____________________________________________________________________________ test_main ____________________________________________________________________________
Traceback (most recent call last):
  File "/usr/local/google/home/tmatsuo/work/python-docs-samples/iap/iap_test.py", line 51, in test_main
    IAP_CLIENT_ID)
  File "/usr/local/google/home/tmatsuo/work/python-docs-samples/iap/make_iap_request.py", line 54, in make_iap_request
    raise Exception('Service account does not have permission to '
Exception: Service account does not have permission to access the IAP-protected application.
--------------------------------- generated xml file: /usr/local/google/home/tmatsuo/work/python-docs-samples/iap/sponge_log.xml ----------------------------------
===Flaky Test Report===

test_main failed (1 runs remaining out of 2).
        <class 'Exception'>
        Service account does not have permission to access the IAP-protected application.
        [<TracebackEntry /usr/local/google/home/tmatsuo/work/python-docs-samples/iap/iap_test.py:51>, <TracebackEntry /usr/local/google/home/tmatsuo/work/python-docs-samples/iap/make_iap_request.py:54>]
test_main failed; it passed 0 out of the required 1 times.
        <class 'Exception'>
        Service account does not have permission to access the IAP-protected application.
        [<TracebackEntry /usr/local/google/home/tmatsuo/work/python-docs-samples/iap/iap_test.py:51>, <TracebackEntry /usr/local/google/home/tmatsuo/work/python-docs-samples/iap/make_iap_request.py:54>]

===End Flaky Test Report===
======================================================================== 1 failed in 0.60s ========================================================================
nox > Command pytest --junitxml=sponge_log.xml failed with exit code 1
nox > Session py-3.7 failed.

Activity

  1. assigned and unassigned on May 26, 2020
  2. added
    api: iapIssues related to the Identity-Aware Proxy API.
    type: processA process-related concern. May include testing, release, or the like.
    on May 26, 2020
  3. tmatsuo commented on Jun 4, 2020

    @tmatsuo
    ContributorAuthor

    I just realized that the test succeeds on my workstation, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: iapIssues related to the Identity-Aware Proxy API.testingtype: processA process-related concern. May include testing, release, or the like.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions