go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/tokenserver/testing/README.md (about)

     1  # The token server <-> client semi-manual integration test
     2  
     3  **TODO: this test is broken since GAEv1 => GAEv2 migration: there's no local
     4  devserver and no local Datastore anymore.**
     5  
     6  This test sets up and configures local instance of the token server and tests
     7  that clients are able to use it.
     8  
     9  Prerequisites:
    10  
    11  * Some Cloud Project that will host service account. You must have "Editor" and
    12    "Service account actor" roles in this project, and Cloud IAM API must be
    13    enabled. The test will create `luci-token-server-test-1` service account
    14    belonging to this project.
    15  * [gcloud](https://cloud.google.com/sdk/gcloud/) tool, with you authenticated
    16    (via `gcloud init`). It magically enables GAE dev server to use real OAuth
    17    tokens (belonging to your account) when making URL fetch calls (in particular
    18    to Cloud IAM).
    19  * `$GOROOT` and `$GOPATH` properly configured, `$GOBIN` in `$PATH`.
    20  * `openssl` tool available in `$PATH`.
    21  * `gae.py` tool available in `$PATH`.
    22  
    23  How to run the test:
    24  
    25  1. Open a terminal tab, run `devserver.sh`. It will start the token server.
    26  1. In another tab run `clrserver.sh`. It will start a server that serves CRLs.
    27  1. Finally, in the main tab run `run_test.sh` to execute the actual test.
    28  
    29  Keeping other two services in separate tabs is helpful for two reasons:
    30  
    31  * You can investigate the state of the server using RPC explorer in the browser.
    32  * Starting and killing background devappserver in a script is surprisingly
    33    difficult task. `Ctrl+C` in a tab seems to do the trick more reliably.