(t *testing.T)
| 21 | ) |
| 22 | |
| 23 | func TestGcloud(t *testing.T) { |
| 24 | if testing.Short() { |
| 25 | t.Skip("skipping gcloud integration tests") |
| 26 | } |
| 27 | |
| 28 | // gcloud is configured. Try to obtain a token from gcloud config |
| 29 | // helper. |
| 30 | ts, err := gcloud.TokenSource() |
| 31 | if err != nil { |
| 32 | t.Fatalf("failed to get token source: %v", err) |
| 33 | } |
| 34 | |
| 35 | _, err = ts.Token() |
| 36 | if err != nil { |
| 37 | t.Fatalf("failed to get token: %v", err) |
| 38 | } |
| 39 | } |
nothing calls this directly
no test coverage detected