Skip to content

Commit

Permalink
Run auth tests on cloud runner
Browse files Browse the repository at this point in the history
  • Loading branch information
manicminer committed Jan 30, 2022
1 parent 40a620f commit ca0ce47
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/auth-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ on:
- "auth/**.go"
- ".github/workflows/auth-tests.yml"

env:
AZURE_ENVIRONMENT: ${{ secrets.AZURE_ENVIRONMENT }}
CLIENT_ID: ${{ secrets.AUTH_CLIENT_ID }}
CLIENT_CERTIFICATE: ${{ secrets.AUTH_CLIENT_CERTIFICATE }}
CLIENT_CERTIFICATE_PASSWORD: ${{ secrets.AUTH_CLIENT_CERTIFICATE_PASSWORD }}
CLIENT_SECRET: ${{ secrets.AUTH_CLIENT_SECRET }}
MSI_TOKEN: ${{ secrets.AUTH_MSI_TOKEN }}
TENANT_ID: ${{ secrets.TENANT_ID }}

jobs:
test-auth:
runs-on: self-hosted
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
Expand Down
2 changes: 1 addition & 1 deletion auth/msi.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func azureMetadata(ctx context.Context, url string) (body []byte, err error) {
}
defer resp.Body.Close()
if c := resp.StatusCode; c < 200 || c > 299 {
err = fmt.Errorf("received HTTP status %d", resp.StatusCode)
err = fmt.Errorf("received HTTP status %d with body: %s", resp.StatusCode, body)
return
}
return
Expand Down

0 comments on commit ca0ce47

Please sign in to comment.